Create a surface from several 1D plots
显示 更早的评论
I have fitted several groups of scattered points (x,z) into 1D plots which vary on a third variable y. I now want to connect these discrete points in a 3D plot with the third axis being y. How would I go about doing this? I tried using the surf function but I need my y variable to be a matrix so I'm confused because for each entry in y (vector) a fitted (x,z) plot is created, so how could y be a matrix?
Apologies if I posed the question poorly and thank you.

采纳的回答
更多回答(1 个)
KSSV
2021-9-8
0 个投票
- See to it that all the curves have same dimensions. If not use interp1 and get them into same size.
- Initliaze matrices X, Y, Z with rows as number of curves and columns as number of points in each curve.
- Use surf on X, Y, Z.
类别
在 帮助中心 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

