close all x=0:pi/50:2*pi; % poznamka % poznamka y=sin(x); plot(x,y,'r') title('Graf funkce') xlabel('Osa x') ylabel('Osa y') grid text(6,-0.4,'Sin(x)') %input('Dej Enter, zadej mysi pozici v grafu') %disp('Zadej mysi pozici v grafu') %msgbox('Zadej mysi pozici v grafu') %gtext('Sinus') % sdsdsds x1=0:pi/50:4*pi; y1=cos(x1); axis(axis) hold on plot(x1,y1) legend('Sin(x)','Cos(x)') hold off figure subplot(2,1,1) plot(x,y) title('Sin x') xlabel('Osa x') subplot(2,1,2) plot(x1,y1) title('Cos x') figure x2=0.01:0.01:10; y2=log(x2); subplot(2,2,1) plot(x2,y2) title('Plot') subplot(2,2,2) semilogx(x2,y2) title('Semilogx') subplot(2,2,3) semilogy(x2,y2) title('Semilogy') subplot(2,2,4) loglog(x2,y2) title('Loglog') figure z=x.^2; subplot(2,1,1) plot(x,y,x,z) title('Graf funkce sin(x) a x^2') subplot(2,1,2) plotyy(x,y,x,z) title('Graf funkce sin(x) a x^2, dve osy Y') %3-D grafika figure x=[0 5]; y=[1 6]; z=[2 4]; plot3(x,y,z) grid figure plot3(sin(x1),cos(x1),x1) grid