How can I plot three variables in one 3D graph from two 2D graphs ?

조회 수: 4 (최근 30일)
3 variables x, y and z. I have two 2D graphs. The first 2D graph is obtained by keeping the 'x' constant and varying the 'y', as result, variation of 'z' as a function of 'y' with 'x' is constant. The second 2D graph is obtained, this time, by keeping the 'y' constant and varying the 'x', as result, variation of 'z' as a function of 'x' with 'y' is constant. Now, I want to plot the variation of the 3 variables x,y and z in a single 3D graph. Could you help me please?

채택된 답변

Star Strider
Star Strider 2018년 7월 1일
See if the plot3 (link) function or similar (such as scatter3 or stem3) will do what you want.
Example
figure
scatter3(x, y, z)
grid on
  댓글 수: 4
omar diouri
omar diouri 2018년 7월 4일
Yes, you are right. Thank you very much.

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by