Borrar filtros
Borrar filtros

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

17 visualizaciones (últimos 30 días)
Jasnoor Singh
Jasnoor Singh el 24 de Jun. de 2016
Comentada: Torsten el 24 de Jun. de 2016
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?

Respuesta aceptada

Torsten
Torsten el 24 de Jun. de 2016
[X,Y] = meshgrid(1:50,1:50);
Z=3*ones(length(Y),length(X));
surf(X,Y,Z);
Best wishes
Torsten.
  7 comentarios
Tien Tran
Tien Tran el 24 de Jun. de 2016
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 el 24 de Jun. de 2016
https://www.mathworks.com/matlabcentral/fileexchange/5105-making-surface-plots-from-scatter-data
Best wishes
Torsten.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by