Extend line plot to a Surface

15 ビュー (過去 30 日間)
Mazhar
Mazhar 2013 年 7 月 23 日
Hey, I am trying to plot a surface but am struggling to find the right commands. I have a 2D plot of a line going diagonally down. I want to extend this line to the 3rd dimension, so that it creates a surface. Is it possible to do this in MatLab? What commands can I use. Thanks

採用された回答

kjetil87
kjetil87 2013 年 7 月 23 日
編集済み: kjetil87 2013 年 7 月 23 日
x=10:-1:1; % your 2d_line
x3d=repmat(x,[numel(x),1]);
surf(x3d);
  22 件のコメント
Mazhar
Mazhar 2013 年 7 月 26 日
Ok, I see what you mean! Trying it out just now and it seems to be working so far!
Hopefully can get this section done and over with now!
Mazhar
Mazhar 2013 年 8 月 2 日
kjetil87, Thank you very much for all your help!
that's all of my problem sorted now. I have a nice plot of the line intersecting the the two surfaces :D

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by