How to rotate 3D plot
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi
I have simple code which stacks 3 layers vertically but I want them to rotate so they became parallel along x/y axis.
here is the code I have:
clear all;clc x = -2:.1:2; y = x; z = rand(length(x),length(y));
for k = 1:15:length(z) A = imrotate(z,-90); z1 = ones(size(A))*k+2; surf(x,y,z1,abs(A))
hold on end
xlim([-2.5 2.5]) ylim([-2.5 2.5]) zlim([-5 50])
set(gca,'Ydir','Normal'); colormap ('jet'); shading('flat');
here is what I get from the code:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151007/image.jpeg)
And here is what I am looking for:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/151008/image.jpeg)
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu 3-D Scene Control finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!