MATLAB: How to plot three functions in three separate figures and simultaneously in one figure but in three different windows of the same figure

how to plot three functions in three separate figures and simultaneously in one figure but in three different windows of the same figure?

Hello Sir, I want to plot three functions (A,B and C) against z in three seperate figures. Please tell me the possible code.
A=function 1 (y axis)
B=function 2 (y axis)
C= function 3 (y axis )
z on x-axis
Also please tell me , how to create three seperate figures in just one window so that plotts can be seen in one figure but in three different windows of the same one figure. Thankyou for your guidance

Best Answer

Look in the documentation for the function subplot
figure;
subplot(3, 1, 1);
plot(z,A);
subplot(3, 1, 2);
plot(z,B);
subplot(3, 1, 3);
plot(z,C);
if A, B, and C are functions (.m files) rather than variables it may be that the code you should use is
figure;
subplot(3, 1, 1);
fplot(@A,[min(z) max(z])]);
subplot(3, 1, 2);
fplot(@B,[min(z) max(z])]);
subplot(3, 1, 3);
fplot(@C,[min(z) max(z])]);