create 3D plot for beginners

조회 수: 2 (최근 30일)
Natasha Kratowska
Natasha Kratowska 2012년 8월 13일
Hello,
Please help me with the following:
I`d like to create a 3D plot from the following variables
x=[1;2;3;4;5]
y=[0.5;0.6;0.7;0.8;0.9]
z=[50;100;100]
The plot should show the relationship between x and y for variable number of z (3 cases):
f(x,y) for z=50
f(x,y) for z=100
f(x,y) for z=1000
Thank you very much.
Natasha

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2012년 8월 13일
편집: Azzi Abdelmalek 2012년 8월 13일
x=[1;2;3;4;5]
y=[0.5;0.6;0.7;0.8;0.9]
% first case z=50
z=repmat(50,length(x),1);
plot3(x,y,z)
% second case z=100
z=repmat(100,length(x),1);
plot3(x,y,z)
  댓글 수: 1
Natasha Kratowska
Natasha Kratowska 2012년 8월 13일
Thank you for your response.
Is it possible to have only 1 3d plot?
The three axis would have the corresponding values of x, y, z.
Natasha

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by