background image

 

>> ezplot('sin(x)') 
>> ezplot('sin(x)',[0 4*pi]) 
>> x=0:0.1:4*pi; 
>> y=sin(x)/(x+0.1); 
>> y=sin(x)./(x+0.1); 
>> plot(x,'DisplayName','x','YDataSource','x');figure(gcf) 
>> plot(y,'DisplayName','y','YDataSource','y');figure(gcf) 
>> plot(y) 
>> plot(y) 
>> plot(x,y) 
>> plot(x,y) 
>> plot(x,y) 
>> plot(x,y,'r') 
>> plot(x,y,'g') 
>> plot(x,y,'y') 
>> plot(x,y,'c') 
>> plot(x,y,'m') 
>> plot(x,y,'b') 
>> plot(x,y,'--') 
>> plot(x,y,'r.-') 
>> plot(x,y,'g-','LineWidth',2) 
>> plot(x,y,'*') 
>> plot(x,y,'+') 
>> plot(x,y,'s') 
>> plot(x,y,'p') 
>> plot(x,y,'h') 
>> plot(x,y,'p','MarkerSize',12,'MarkerEdgeColor','r') 
>> plot(x,y,'r') 
>> figure(1),plot(x,y,'r') 
>> figure(2),plot(x,y,'rp') 
>> close 
>> close all 
>> plot(x,y,'r') 
>> grid 
>> xlabel('os X') 
>> ylabel('os Y') 
>> title('wykres funkcji sin(x)/x') 
>> plot(x,z) 
>> ylim([-500 500]) 
>> grid 
>> xlim([5 10]) 
>> axis([0 6 -100 200]) 
>> axis('auto') 

background image

>> axis('equal') 
>> axis('square') 
>> plot(sin(x),cos(x)) 
>> axis('square') 
>> plot(x,y,'r',sin(x),cos(x),'k') 
>> plot(x,y,'r') 
>> hold on 
>> plot(sin(x),cos(x)) 
>> plot(x,z) 
>> hold off 
>> plot(x,z) 
>> plot(x,y) 
>> ylim([-5 5]) 
>> hold off 
>> plotyy(x,y,x,z) 
>> grid 
>> title('wykresy') 
 
>> plot(x,y) 
>> semilogx(x,y) 
>> semilogx(x,y,'p') 
>> semilogy(x,y,'p') 
>> grid 
>> loglog(x,y,'p') 
>> loglog(x,y) 
>> grid 
>> area(x,y,'BaseValue',0.4) 
>> stem(x,y) 
>> stem(x,y,'fill') 
>> stairs(x,y) 
 
>> polar(x,y) 
>> polar(x,sin(x)) 
>> bar(y) 
>> v=4*rand(1,10); 
>> bar(v) 
>> v=4*rand(1,10); 
>> bar(v) 
>> x=linspace(0,5,10) 
x = 
  Columns 1 through 6 
            0  5.5556e-001  1.1111e+000  1.6667e+000  2.2222e+000  2.7778e+000 
  Columns 7 through 10 
  3.3333e+000  3.8889e+000  4.4444e+000  5.0000e+000 
>> bar(x,v) 

background image

>> barh(x,v) 
>> w=5*rand(5,2) 
w = 
  3.2787e+000  3.7887e+000 
  1.7856e-001  3.7157e+000 
  4.2456e+000  1.9611e+000 
  4.6700e+000  3.2774e+000 
  3.3937e+000  8.5593e-001 
>> bar(w) 
>> bar(w,'stack') 
>> bar(w,'group') 
>> bar(w,'group') 
>> bar(w) 
>> pie(v) 
>> v 
 
>> pie3(v) 
>> bar3(w) 
>> bar3(w,'stack') 
>> bar3(w,'group') 
>> [X,Y]=meshgrid(-2:0.1:2,-2.2:0.1:2.2); 
>> Z=X.*exp(-X.^2-Y.^2); 
>> mesh(Z) 
>> mesh(X,Y,Z) 
>> view([30 45]) 
>> view([30 -45]) 
>> meshz(X,Y,Z) 
>> meshc(X,Y,Z) 
>> surf(Z) 
>> shading flat 
>> shading faceted 
>> shading interp 
 
>> colormap copper 
>> colormap pink 
>> colormap hot 
>> colormap cool 
>> colormap spring 
>> colormap gray 
>> colormap bone 
>> surf(X,Y,Z) 
>> colormap default 
>> surfc(X,Y,Z) 
>> contour(X,Y,Z) 
>> pcolor(X,Y,Z) 

background image

>> shading flat 
>> shading interp 
 
>> x=0:0.1:4*pi; 
>> plot3(sin(x),cos(x),x) 
>> comet(x,y) 
>> comet(x,y) 
>> plot(x,y) 
>> text(2,0.8,'Wykres') 
>> gtext('Wykres') 
>> gtext('Wykres') 
>> ginput(3) 
>> a=ginput(1) 
>> u=10*rand(1,100); 
>> hist(u) 
>> e=0.1*rand(size(x)); 
>> errorbar(x,y,e)