plot 2 vectors in 3D plot
Show older comments
Hello everybody,
I would like to plot 2 vectors, but the second one should be shifted, in order to have a 3D plot with two lines, one for each vector. I had a look at the documentation but I could not find anything like that, and I don't want to plot an extrapolated surface out of this 2 vectors.
Any idea?
regards
Maurizio
Answers (3)
maurizio
on 8 Feb 2011
Walter Roberson
on 8 Feb 2011
C = ones(length(A),1);
plot3(1:length(A),[C,C+1],[A(:),B(:)]);
You don't really need D, and you don't need the 'hold all' if you plot both lines in one call.
maurizio
on 10 Feb 2011
0 votes
Categories
Find more on Annotations 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!