how to plot a matrix values in 3d plot

조회 수: 6 (최근 30일)
abdelmadjid benrabah
abdelmadjid benrabah 2021년 9월 26일
댓글: Star Strider 2021년 9월 26일
how to plot a matrix values in 3d plot
x=[0.2:0.5:0.8:1:1.5]
y=[0:0.2:0.4:0.6:0.8]
I got the matrix z=matrix(5x5) values from excel and each values correspond to x and y.

채택된 답변

Star Strider
Star Strider 2021년 9월 26일
It would be nice to have the ‘z’ matrix as well, however in its absence, I will create one.
x=[0.2;0.5;0.8;1;1.5];
y=[0;0.2;0.4;0.6;0.8];
z = x*y.';;
figure
surf(x, y, z)
grid on
xlabel('x')
ylabel('y')
Use semicolons (;) not colons (:) to do vertical concatenation. They are two entirely different operators, and are used for entirely different purpoases.
.
  댓글 수: 4
abdelmadjid benrabah
abdelmadjid benrabah 2021년 9월 26일
thank you so much,
I got it, I will see if I need someting else I will contact you.
Star Strider
Star Strider 2021년 9월 26일
As always, my pleasure!
I will do my best to provied useful solutions.
.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by