.


:




:

































 

 

 

 


, .




xlabel ( , ), ylabel ( , ), title ( ), text ( ) legend ( ).

>> text(x,y,'Sample Text')

x, y , ( , , ).

grid on

() .

. , , (. 2.10.4):

>> x=0:0.001:2*pi;

>> y1=cos(x);

>> y2=sin(x);

>> plot(x,y1,'-',x,y2,'-.')

>> legend('cos(x)','sin(x)',3)

>> xlabel('Coordinate x');

>> ylabel('Coordinate y');

>> grid on

>> title('Functions cos(x), sin(x)')

, legend (, ) :

-1 ;

0 , ;

2 ;

. 2.10.4. , .

. 2.10.5. .

3 ;

4 .

() , , . MATLAB
plotyy, . , , , , . , (. 2.10.5):

>> x=0:0.001:2*pi;

>> y1=cos(x);

>> y2=5*sin(x);

>> plotyy(x,y1,x,y2)

.

>> x=0:0.001:2*pi;

>> y=cos(x);

>> plot(x,y);

>> title('Graph of Sample Function cos(x)');

>> xlabel('Coordinate x');

>> ylabel('Coordinate y');

>> text(4.0,-0.6,'\leftarrowcos(x)');

>> grid on

, . 2.10.6.

, , \ ( ) . , MATLAB TeX. , , \newline.

, ,

>> htext=text(4.0,-0.6,'\leftarrowcos(x)');

htext text, . ,

set(htext,'Color',[1 0 0],'FontSize',[18]);

, .

 

. 2.10.6. .

, , , ( ). , , Color axes [0.8 0.5 0.5], :

>> haxes=gca;

gca axes. , axes , , .

, , :

>> set(haxes,'Color',[0.8 0.5 0.5]);

:

>> FigureColor=[0.8 0.5 0.5];

>> hfigure=gcf;

>> set(hfigure,'Color',FigureColor);

 





:


: 2016-12-06; !; : 528 |


:

:

. .
==> ...

1276 - | 1248 -


© 2015-2024 lektsii.org - -

: 0.011 .