create 3D plot for beginners
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
采纳的回答
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)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Lighting, Transparency, and Shading 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!