How to combine the using of meshgrid and surface?
7 次查看(过去 30 天)
显示 更早的评论
The value of the graph are
x = [ 0.02];
y = [ 0.35];
z = [ 1];
I am trying using this one but it wont work
[xx,yy = meshgrid(x,y)
figure;
surf(xx,yy,zz);
0 个评论
采纳的回答
Walter Roberson
2020-12-2
x = linspace(0,.1);
y = linspace(.3, .4);
[X, Y] = meshgrid(x, y);
Z = X.^2 - 5.*Y.^3 + sin(5*2*pi*X);
surf(X, Y, Z, 'edgecolor', 'none')
You cannot surf() a single point. If you need to draw one 3d point at a time, use either plot3() with a marker set, or use scatter3() (for lots of points, consider using a pointcloud)
更多回答(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!