Color axis of surf plot

7 visualizaciones (últimos 30 días)
Flashbond
Flashbond el 23 de Ag. de 2013
I have a room 12x12m². I placed data loggers in every 3 meters in order to measure temperature and humidity. The surface plot below represents the room humidity:
% Actual Data
Zh = [40.8,41.1,41.4;40.7,41,41.6;40.7,41.1,41.3]
[X,Y] = ndgrid([3,6,9],[3,6,9]);
% Interpolation
F = griddedInterpolant(X,Y,Zh,'linear');
[Xnew,Ynew] = ndgrid(1:11,1:11);
Zhnew = F(Xnew,Ynew)
surf(Xnew,Ynew,Zhnew)
I want to add room temperature data to this code below in order to make surface plot's colors.
Zt = [24.6,24.4,24;24.7,24.3,24;24.6,24.1,23.9]
What I try to mean is, humidity will be height of the surface plot and temperature will be colors from green to red.

Respuesta aceptada

Walter Roberson
Walter Roberson el 23 de Ag. de 2013
See the documentation:
surf(X,Y,Z,C) uses C to define color. MATLAB® performs a linear transformation on this data to obtain colors from the current colormap.
  1 comentario
Flashbond
Flashbond el 23 de Ag. de 2013
Editada: Flashbond el 23 de Ag. de 2013
Thanks for the source. did the trick!

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

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by