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

조회 수: 3 (최근 30일)
Jasnoor Singh
Jasnoor Singh 2016년 6월 24일
댓글: Torsten 2016년 6월 24일
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에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by