Plotting surface by Matlab

Rock

New member
Joined
Feb 14, 2012
Messages
18
Hello

I need to plot the function

u(t,x) = cos (pi x)cos (pi t).
where
x, and t between 0 and 1.

How can I plot this three dimension surface?

With All Best
Raed
 
I need to plot the function

u(t,x) = cos (pi x)cos (pi t), where x and t between 0 and 1.

How can I plot this three dimension surface?
Are you asking someone to teach you how to use the "MatLab" software package? If so, try studying from some online lessons, such as are available here. ;)
 
Are you asking someone to teach you how to use the "MatLab" software package? If so, try studying from some online lessons, such as are available here. ;)

I know how to use the matlab but I do not know why I did not get the graph, for example I tried this code


[X,Y] = meshgrid(0:.1:1);

Z = cos(pi*X)*cos(pi*Y);
mesh(X,Y,Z,'EdgeColor','black')


But I got a strange graph.

On the other hand my trial did not recognize on
"Plotfunc3d"
 
...my trial did not recognize on "Plotfunc3d"
For trouble-shooting of your particular software installation, please contact whoever provides your tech support.

I know how to use the matlab but I do not know why I did not get the graph, for example I tried this code

[X,Y] = meshgrid(0:.1:1);

Z = cos(pi*X)*cos(pi*Y);
mesh(X,Y,Z,'EdgeColor','black')

But I got a strange graph.
What was "strange" about it?

By the way, since X, Y, and Z are matrices (within MatLab's 3D graphing), shouldn't there be points after the variables? Like they show here and here ;)
 
Top