I have multiple vectors of varying lengths that I would like to plot next to each other in 3D space in Matlab.
As an example:
Say I have three vectors:
X is a 5×2 vector,
Y is a 10×2 vector and
Z is a 15×2 vector.
Each element of every vector has the format:
x value, y value
but the x values of the various vectors do not match.
I would like to plot these vectors in 3D space, next to each other. The reason why I don’t want to plot them using “hold” is because most of the data have the same values, but I would like to see how many of the plots have the same value at a specific time.
I hope my questions makes sense. Please just ask if anyone is unsure.
I think you are looking for the function
ribbon.Documentation: http://www.mathworks.fr/help/techdoc/ref/ribbon.html
EDIT:
if your x’s do not have the same length, you can combine it with
interp1as follow: