Plotting several 2d plots on a 3d axis.

13 vues (au cours des 30 derniers jours)
Athena Karsa
Athena Karsa le 8 Juin 2017
Réponse apportée : KSSV le 8 Juin 2017
So I have a particular parameter which I'm interested in what happens for different values of it:
w = 0:0.1:1;
Then I compute a value, I, which changes over time for each particular value of w, i.e., I = I(n,t) where t is the index for the time and n is the index for the particular w value I want.
Now, I want to make a plot for how I changes for each variable, w and time. I have that size(w)=11 and size(time)=2001 so that I is a matrix of size 11x2001.
I've tried using surf but can't see much in it.
I would like to know how to create a 3D plot of individual 2D plots, so that it looks like graphs of I (in z), varying with time (in y) but then repeated for each distant value of w in a sort-of fake x-axis. Something like what's attached.
Any ideas? Thank you in advance!

Réponses (1)

KSSV
KSSV le 8 Juin 2017
N = 25 ;
[X,Y,Z] = peaks(N) ;
%%ribbon plot
ribbon(Y,Z) ;
figure
hold on
for i = 1:N
plot3(X(i,:),i+ones(N,1),Z(i,:))
end
view(3)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by