Interchange the Y and Z axis in 3D- isosurface plot
8 views (last 30 days)
Show older comments
Dear all,
The last few days I'm having trouble trying to interchange the Y- and Z- axis on a 3D- isosurface plot. I want to interchange the Y- and Z-axis in order to visualise it and to be able to discuss the result more clearly. I remember that in the past I used to interchange the Y- and Z-axis in two ways:
1) using the axis-handle:
yy = get(gca, 'YData');
zz = get(gca, 'Zdata');
set(gca, 'YData', zz, 'ZData', yy);
The error I encounter is the following: 'There is no 'Ydata' property in the 'axes' class.'
2) interchanging by switching the data in the isosurface-command:
isosurface(X, Z, Y, calulated_rotor, iso_value)
I get the following error: 'X, Y and Z must be matrices produced by MESHGRID.'
However, X,Y,Z are generated using meshgrid. I tried to solve this error:
[X Z Y] = meshgrid(x, z, y) % instead of [X Y Z] = meshgrid(x, z, y)
% recalculate the velocity matrices VX, VY, VZ: 3D-matrices , code not provided
calculated_rotor_2 = rotor(X, Z, Y, VX, VZ, VY) % instead of calculated_rotor = rotor(X,Y,Z, VX, VY, VZ)
isosurface(X, Z, Y, calculated_rotor_2, iso_value) % instead of isosurface(X, Y, Z, calculated_rotor, iso_value)
However this displays not the rotated version of the first rotor I calulated. It displays a wrong calculated rotor. So my main question remains: How can I interchange the Y and Z axis in a correct way?
My Matlab version is R2010a.
Thanks to you all in advance!
Kind regards, Lennert J.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!