How can I plot 3 parallel curves AND join each point transversally in a 3D graph/plot?

3 vectors define a curve of "random" data. I have 3 parallel curves sorted from left to right as curves 1,2,3. I'd like to join each, lets say, Z coordinate of curve 1 to curve 2 and curve 2 to curve 3 to create a sort of surface. I appreciate any help since I'm a kind of begginer in Matlab.
Thanks in advice!

 Accepted Answer

1. Create an nx3 or 3xn array, concatenating the data into one matrix.
2. Call surf with that array.
You don't tell us what the independent variable is, nor even if there are the same number of points in each curve. If not, then you can't create a rectangular array unless you interpolate the curves to have the same number of points. interp1 would be sufficient for that purpose.

2 Comments

Sorry for the lack of information. Effectively, the 3 curves shown contain the same number of data each.
So as I said, concatenate them into one array, then call surf.

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!