.


:




:

































 

 

 

 


. MATLAB ,




 

MATLAB , , (GUI). .

() () . X Y, , (). MATLAB , () X Y .

plot (X, Y) , (, ) Y X. X Y , , .

plot (X, Y, S) plot(X, Y), S.

S , 4.1.

 

4.1

-
--
: ()
-. -
4.1
c
m
y
4.1
r
g
b
w
k
.
+
*
( )
( x)

 

, S , (, , , . .) .

lot (X1, Y1, S1, 2, Y2, S2, , Y3, S3,...) , (X, Y, S), X Y , a S . , , , . ( ). , .

, . , . plotyy, , .

z (x, ). , . X Y .

meshgrid. . meshgrid :

[X,Y,Z] = meshgrid(x, y, z) , ;

[X,Y] = meshgrid (x, y) , , X Y, . X , Y .

plot3 (...) plot(...), z (x, ). :

plot3 (x, y, z) , , z, . ;

plot3 (X, Y, Z, S) ;

plot3 (x1, y1, z1, s1, 2, 2, z2, s2,...) z1 (x1, y1), z2 (x2, y2) . . .

. mesh. :

mesh (X, Y, Z, C) Z (X, Y) , ;

mesh (X, Y, Z) C = Z.

, . mesh surface. mesh:

>> [X, Y]=meshgrid([-3:0.15:3]);

>> Z=X.^2+Y.^2;

>> mesh(X, Y, Z)

 

 

4.1 , mesh(X,Y,Z)

 

, MATLAB . , title ('string') , 'string'.

, z : xlabel ('String'), ylabel ('String'), zlabel ('String').

 

 

4.2 :

xlabel('String'), ylabel('String'), zlabel('String')

 

, . text:

text (X, Y, 'string') , 'string', (X, Y). X Y , [ x (i), y (i)];

text (X, Y, Z, 'string') , 'string', , X, Y Z.

gtext:

gtext ('string') 'string' . , .

, , . legend:

legend (stringl, string2,, strings) , ;

>> legend('')

 

4.3

 

l egend (Pos) , Pos:

Pos=0 , ;

Pos=l ;

Pos=2 ;

Pos=3 ;

Pos=4 ;

Pos=-l .

, legend

. axis :

axis ([XMIN XMAX YMIN YMAX]) ;

axis ([XMIN XMAX YMIN YMAX ZMIN ZMAX]) , z ;

axis auto ;

, . grid :

grid on ;

grid off .

. hold. :

hold on , ;

hold off ;

, . subplot, :

subplot (m, n, p) m × n , m , n , , ( ).

subplot ( . 4.4):

>>subplot(3, 2, 1); plot (x,y);

>> subplot(3, 2, 4); plot (x,y);

>> subplot(3, 2, 5); plot (x,y);

 

4.4 subplot

 

3 . .

 

 

1. f1, f2, f3 4.2. , , .

 

 

4.2

         
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

 

2. f4 () 4.2.

3. - - (. 4.3) .

 

4.3 -

 

       
   
   
4.3
       
   
     
   
   
   
   

 

1. .

2. .

 

1. ?

2. mesh?

3. ?

4. grid?

5. ?

6. hold?


5





:


: 2016-11-18; !; : 782 |


:

:

: , .
==> ...

2010 - | 1637 -


© 2015-2024 lektsii.org - -

: 0.04 .