MATLAB: How to create another y-axis on right side

axisMATLAByaxis

How can I create another two axis in same figure?
x=A0006_charge(:,1);
y=A0006_charge(:,2);
a=A0006_charge(:,3);
z=A0006_charge(:,4);
plot(a, x, a, y, a, z);
I tried "yyaxis right" but its not working.

Best Answer

Hi,
use yyaxis. For example:
x=A0006_charge(:,1);
y=A0006_charge(:,2);
a=A0006_charge(:,3);
z=A0006_charge(:,4);
yyaxis left
plot(a, x, a, y)
yyaxis right
plot(a, z);
Best regards
Stephan