How to make plot3 as surf?

조회 수: 18 (최근 30일)
Serdar SOYER
Serdar SOYER 2021년 4월 24일
댓글: Star Strider 2021년 4월 24일
Hello everyone,
I have 3 datas in space: x_sec is 97x10, y_sec is 97x10 and z_sec is 1x10 matrices. When I use the plot3(x_sec,y_sec,z_sec) command I get line plotted in 3d. But I want a surface plot using surf. How can I achieve that?
This is a proplleler with a twist.

채택된 답변

Star Strider
Star Strider 2021년 4월 24일
One option might be to use repmat
z_sec2 = repmat(z_sec, 97, 1);
then —
figure
surf(x_sec,y_sec,z_sec2)
I have no idea how well that will work because I do not have the data, so you will have to experiment with it.
  댓글 수: 2
Serdar SOYER
Serdar SOYER 2021년 4월 24일
It worked perfectly, thank you so much!
Star Strider
Star Strider 2021년 4월 24일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by