.


:




:

































 

 

 

 





MATLAB . ( ).

y:

x=0:0.01:2; y=sin(x);

:

plot(x,y)

(. 1).

 

 

MATLAB , Figure.

,

z=cos(x);

plot(x,z)

( clf, cla 0 1).

, plot hold on, :

x=0:0.01:2; y=sin(x);

plot(x,y)

z=cos(x);

hold on

plot(x,z)

(. 2), :

x=0:0.01:2; y=sin(x); z=cos(x);

plot(x,y,x,z)

 

 

, , . . plot figure, .

subplot. , .

, sin cos , exp () (. 3):

w=exp(x);

subplot(1,2,1); plot(x,y,x,z)

subplot(1,2,2); plot(x,w)

 

 

. subplot , , , ( ). subplot :

subplot(1,1,1)

, . semilogx, semilogy loglog.

(. 4) polar.

phi=0:0.01:2*pi; r=sin(3*phi);

polar(phi,r)

 

 

, , . ,

x=0:0.1:3; y=sin(x);

plot(x,y,'r-',x,y,'ko')

(. 5), . plot , . 'r-', ( r), . , 'ko', ( k) ( o) .

 

 

plot (x1, y1, s1, x2, y2, s2, ) y1(x1), y2(x2), s1, s2, . .

s1, s2, , (). . . . . , . , , , 'r+-' '-+r' .

, , , .

, . MATLAB , . MATLAB . MATLAB, .

axis ([ xmin, xmax, ymin, ymax ]) xlabl, ylabl, title text. xlabl , ylabl ( ). , text. title. , grid on, . (. 6):

 

 

x=0:0.1:3; y=sin(x);

plot(x,y,'r-',x,y,'ko')

title('Function sin(x) graph');

xlabel('xcoordinate'); ylabel('sin(x)');

text(2.1, 0.9, '\leftarrowsin(x)'); grid on

text , . , , . \ ( ).





:


: 2016-09-03; !; : 487 |


:

:

.
==> ...

2011 - | 1883 -


© 2015-2024 lektsii.org - -

: 0.009 .