
How do I plot a 3d shape from a function?
3 次查看(过去 30 天)
显示 更早的评论
I have to plot the following function:

where [c1,c2,c3,c4] = [2.13,2.22,2.62,0.177]
Is there a way of doing this?
Thank you
0 个评论
采纳的回答
Hiro Yoshino
2022-6-19
x = -2:0.25:2;
y = x;
if you want to visualize this
, then

surf(x,y,x.*exp(-x.^2 -(y').^2))
You can also perform the same thing by using meshgrid function - this might be easier for you to understand this..
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!