Plotting two functions on 3D surface for the same interval
9 次查看(过去 30 天)
显示 更早的评论
Hello
I have two functions, say
Z1=x^2
Z2=x^3
x: 0:10
How i can create a 3D surface plot
thanks in advance
0 个评论
采纳的回答
Star Strider
2020-1-24
Try this:
x = 0:10;
Z1=x.^2;
Z2=x.^3;
figure
surf(Z1.'*Z2)
Another possibility:
figure
surf([Z1; Z2])
It is not certain what you want.
4 个评论
Star Strider
2020-1-25
Fuad Nammas’s Answer moved here —
why is the scale on the x-axis on the plot does not fit the given interval x:0:10
更多回答(3 个)
Fuad Nammas
2020-1-25
1 个评论
Star Strider
2020-1-25
That is not possible as you have defined the plot.
The ‘x’ and ‘Z1’ vectors define the axes, so only ‘Z2’ can have color associated with the surface plot.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Object Properties 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!