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) )

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

>> 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

With this change


>> mesh(sin(X+Y).*cos(X-Y))
>>

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy