Need help with 3-d graph

2 vues (au cours des 30 derniers jours)
sagar pokhrel
sagar pokhrel le 10 Mar 2014
Modifié(e) : Mischa Kim le 10 Mar 2014
Its 3-d surface, where source is in z axis, perpendicular to XY plane. I have theta (angle made by point p(r,theta)), r radius , and k=data points(11 by 73). there are other funcction beta=2*atan(1.5./r); another function G= beta./(4*r.*sin(theta)); another function t=.5.*r-.145*r.^2; now final function F= G.*t.*k
theta=linspace(0,2*pi,73);
r=linspace(0,50,11);
[theta,r]=meshgrid(theta,r);
k=(11by73) data;
G= beta./(4*r.*sin(theta))
t=.5.*r-.145*r.^2;
F= G.*t.*k;
How do I convert this to cartesian and make a 3-d or surface plots

Réponse acceptée

Mischa Kim
Mischa Kim le 10 Mar 2014
Modifié(e) : Mischa Kim le 10 Mar 2014
Use pol2cart, see, for example, the first example here.
...
[THETA,R] = meshgrid(theta,r);
[X,Y] = pol2cart(THETA,R);
...
surf(X,Y,F)

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by