Slice (Or contour) 3D function (in polar coordinate) transformed into cartesian coordinate
2 views (last 30 days)
Show older comments
Dear all,
I hope you are doing well!
I have a function f=f(r,z); definied in polar coordinate!
z=0:0.1:1;
Theta=0:0.1:2*pi;
I transformed this function into cartesian coordiante;
[x,y] = pol2cart(Theta,r);
[X,Y, Z] = meshgrid(y,x,z);
For reasons of comparison, I have gathered all the points by:
X1=[ Y(:) X(:) Z(:)];
The function becoms f=f(X1(:,1),X1(:,2),X1(:,3)); size(f)=(nx*ny*nz, 3);
whene i uses the slice(x,y,z, f, [0 1], [0], [1]), an error is displayed, and this is normal because x and y are disordered.
Can any one help me to present this function into cartesian point.
Thank you in advance
1 Comment
Rik
on 17 Mar 2022
Backup of the question:
Slice (Or contour) 3D function (in polar coordinate) transformed into cartesian coordinate
Dear all,
I hope you are doing well!
I have a function f=f(r,z); definied in polar coordinate!
z=0:0.1:1;
Theta=0:0.1:2*pi;
I transformed this function into cartesian coordiante;
[x,y] = pol2cart(Theta,r);
[X,Y, Z] = meshgrid(y,x,z);
For reasons of comparison, I have gathered all the points by:
X1=[ Y(:) X(:) Z(:)];
The function becoms f=f(X1(:,1),X1(:,2),X1(:,3)); size(f)=(nx*ny*nz, 3);
whene i uses the slice(x,y,z, f, [0 1], [0], [1]), an error is displayed, and this is normal because x and y are disordered.
Can any one help me to present this function into cartesian point.
Thank you in advance
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Cartesian Coordinate System Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!