Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

3-D surface Plot

$
0
0
Hi,
I am trying to create a 3-D Sine Wave, I am trying to use the mesh and surf commands, but I cant get it to come in as 3-D.

Here is what I have so far:
>>[X, Y] = meshgrid(-4:2:4, -4:2:4);
>>Z = cos(X) * sin(Y);
>>figure;
>>surf(X, Y, Z);

But it is not coming in as a 3-D Picture;
Please help?

I will greatly appreciate it!

Viewing all articles
Browse latest Browse all 19628