How to merge several 2D plots and make a single 3D plot if vector lengths are not same.
5 次查看(过去 30 天)
显示 更早的评论
I am trying to plot a 3D plot. for which I want to combine 20 2D plots(20 because I need >15 only for my work).
for 2D plots for these 20 different instances I have created two 20X5 matrix( tau and a ).where each row of tau contains value of X axis and each row of a contains particular Y axis value.
Now for 2D plots I can easily get plot by plot(tau(i,:),a(i,:)) ,where i can be anything between 1 to 20.but what to do if I want all these 2d plots arranged one by one from i=1 to 20. Plotting 3D as surface would be good.
I tried other commands given in other answers but I did not get my desired plot because in most of the cases commands require X,Y,Z to be vectors of same length. but in my problem vector lengths are not same.
please provide suggestions and command , how to solve this issue.
0 个评论
回答(1 个)
Cameron B
2020-1-18
Can you provide some of your data? That way, we could get a better idea of the min/max values for x and y and determine if interpolation or something similar could help.
另请参阅
类别
在 Help Center 和 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!