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 CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by