.


:




:

































 

 

 

 





MatLab :
1. .
2. .
z (x, )= 2 + 2 [0, 1], y - [0, 1]. (, 0.2) , .
, . , x 1, 2,..., 6, y1, 2,..., 6. z (6 x 6), Z , . , z (3,4) z (x,y) (3, 4). MatLab meshgrid, - mesh. ( , ):

[X, ] = meshgrid(0:0.2:1,0:0.2:1)
X =
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
0 0.2000 0.4000 0.6000 0.8000 1.0000
y =
0 0 0 0 0 0
0.2000 0.2000 0.2000 0.2000 0.2000 0.2000
0.4000 0.4000 0.4000 0.4000 0.4000 0.4000
0.6000 0.6000 0.6000 0.6000 0.6000 0.6000
0.8000 0.8000 0.8000 0.8000 0.8000 0.8000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000

Z = X.^2+Y.^2

Z =
0 0.0400 0.1600 0.3600 0.6400 1.0000
0.0400 0.0800 0.2000 0.4000 0.6800 1.0400
0.1600 0.2000 0.3200 0.5200 0.8000 1.1600
0.3600 0.4000 0.5200 0.7200 1.0000 1.3600
0.6400 0.6800 0.8000 1.0000 1.2800 1.6400
1.0000 1.0400 1.1600 1.3600 1.6400 2.0000

mesh(X,Y,Z)

? ? .

MatLab , , . meshgrid, . , . , - . .

, MatLab ,

[-1, 1], y [0, 1].
:

[X, Y] = meshgrid(-1:0.05:1, 0:0.05:1);
Z = 4*sin(2*pi*X).*cos(1.5*pi*Y).*(1-.^2).*Y.*(1-Y);

mesh, :

mesh(X,Y,Z)

. MatLab .

hidden off "", . hidden on , .

surf , , . .

surf(X,Y,Z)

shading flat . , , , shading interp.
shading faceted .
, , , . MatLab colorbar, , . surf .

surf(X,Y,Z)
colorbar

colorbar , .

, xy. meshc surfc . xy ( ):

surfc(X,Y,Z)

MatLab , , contour3. , mesh, surf, meshc surfc . . contour3 , , , . ( levels) , ( ). , , , 0 0.5 0.01:

levels = [0:0.01:0.5];
contour3(X, Y, Z, levels)
colorbar





:


: 2016-12-18; !; : 613 |


:

:

, ,
==> ...

1736 - | 1720 -


© 2015-2024 lektsii.org - -

: 0.008 .