Plot surface from different lines
4 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I have several plots which are in fact just lines. Now I would like to add these lines to form a surface and create a plot of this surface. How can I do that? Thanks in advance.
0 件のコメント
回答 (1 件)
Star Strider
2017 年 1 月 11 日
From your description, I would use the plot3 function. That is likely as close as you can get to a surface with your lines.
Consider using an interpolation function (for example scatteredInterpolant) to create a complete surface from them.
2 件のコメント
Star Strider
2017 年 1 月 11 日
In recent MATLAB releases (I’m using R2016b), the mesh and surf functions allow you to use vectors for the independent variables, so you can just do something like this:
The Code:
x = 1:50; % Create Data
y = 1:6; % Create Data
z = rand(6,50); % Create Data
figure(1)
mesh(x, y, z)
grid on
参考
カテゴリ
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!