## Matlab

Moderators: None (Apply to moderate this forum)
Number of posts: 2174

This Forum Only

Problem in drawing 3D graph in Matlab Posted by spc on 19 Mar 2009 at 8:07 PM
Hi, I'm facing problem in plotting a 3D graph in Matlab. I'm not using the meshgrid or similar function because the range of x and y need to be specified specially(Please refer attachment for details).
Thanks for any reply from u..
Re: Problem in drawing 3D graph in Matlab Posted by giug on 20 Mar 2009 at 1:01 AM
Have you tried the function plot3?
Re: Problem in drawing 3D graph in Matlab Posted by spc on 23 Mar 2009 at 11:08 PM
ya, I had used plot3 in the same program. plot3 is used for 3D line. But what I need is a 3D surface graph specified in a special range of x and y.
I need to draw a 3D grpah of the exact solution, then use plot3 to show the numerical solution( few points) on the 3D graph.
Re: Problem in drawing 3D graph in Matlab Posted by giug on 24 Mar 2009 at 2:52 AM
can't you use the surf function and then modify the axes properties with the function set?
Re: Problem in drawing 3D graph in Matlab Posted by spc on 24 Mar 2009 at 7:22 PM
Can you give me some examples? My problem involved the polar coordinate. suppose it is used polar function in Maple,but in Matlab, I can't understand the polar funtion, so I don't know how to apply the function into my project.
Re: Problem in drawing 3D graph in Matlab Posted by spc on 2 Apr 2009 at 10:50 PM
Did anyone know about cart2pol function in Matlab?
[THETA,RHO] = cart2pol(X,Y)
It means change the cartesian coordinates x and y to polar coordinates. Before applying this method, I think there should be a list of x and y coordinate in the system in order to change it into polar coordinate.
Now, the problem is, if I use meshgrid, the domian is incorrect, it included the coordinate which I do not want (and excluded the coordinate which I want).
Can anyone tell me or teach me how to fix the problem by writting a command code, to specify the range of x and y correctly? Or should I use pol2cart function? change the polar coordinate to cartesian coordinate, then use those cartesian coordinate to plot my graph.
(Please refer to the attachment for a clearer description)
Re: Problem in drawing 3D graph in Matlab (settled) Posted by spc on 5 Apr 2009 at 6:54 PM
Dear anyone, I have been using hard-code to fix my problem. Thanks for any help from you.
Thanks.
Re: Problem in drawing 3D graph in Matlab (settled) Posted by uwenchang on 28 Jan 2010 at 2:45 PM
Hi,

I have a similar problem as you posted.
Could you tell me how to solve it?
Thanks

Uwen

## Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic