Clear %drawing 3-d Graphs and Surfaces (X Y) Meshgrid (-4:0.5:4,-1:0.1:1) An Attempt To 3-d Mesh (Sin (X) . Cos (Y) )
Clear %drawing 3-d Graphs and Surfaces (X Y) Meshgrid (-4:0.5:4,-1:0.1:1) An Attempt To 3-d Mesh (Sin (X) . Cos (Y) )
Clear %drawing 3-d Graphs and Surfaces (X Y) Meshgrid (-4:0.5:4,-1:0.1:1) An Attempt To 3-d Mesh (Sin (X) . Cos (Y) )
0.5
-0.5
-1
30
100
20
80
60
10
40
20
0
0.5
-0.5
-1
30
100
20
80
60
10
40
0
>> x=-0.5:0.005:0.5;
>> y=x;
>> [X Y]=meshgrid(x,y);
>> mesh(X.^2+Y.^2)
>>
20
0
0.5
0.4
0.3
0.2
0.1
0
300
250
200
200
150
100
100
0
>> mesh(X.^2-Y.^2)
>>
50
0
0.4
0.2
-0.2
-0.4
300
250
200
200
150
100
100
0
>> x=-3:0.25:3;
>> y=-3:0.25:3;
>> [X Y] =meshgrid(x,y);
>> Z=X.*exp(-X.^2+-Y.^2);
>> s1=surf(X,Y,Z);
>>
50
0
0.5
-0.5
4
2
4
2
-2
-2
-4
-4