How can I plot a constant Z value with varying X and Y ?

31 次查看(过去 30 天)
I want to plot a value of Z=3 for X=1:50 and Y=1:50 so that I can get a plane surface plot. Any suggestions please?

采纳的回答

Torsten
Torsten 2016-6-24
[X,Y] = meshgrid(1:50,1:50);
Z=3*ones(length(Y),length(X));
surf(X,Y,Z);
Best wishes
Torsten.
  7 个评论
Tien Tran
Tien Tran 2016-6-24
I understand that, but Z is obtained from experimental data, it is not a function of x and y. Can I plot it?
Torsten
Torsten 2016-6-24
https://www.mathworks.com/matlabcentral/fileexchange/5105-making-surface-plots-from-scatter-data
Best wishes
Torsten.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by