title: How can I visualize/plot temperature gradient using matlab?
body: <p><img src="https://i.stack.imgur.com/iPGiz.jpg" alt="One side should look like this, depending upon temperature values a smooth description"><img src="https://i.stack.imgur.com/iPGiz.jpg" alt="enter image description here">I have data at specific points in 3D rectangle and I want to see temperature gradient. I have values at specific points , but I want a continous flow of gradient between each sensor. I am not been able to figure out how to visualize or map data in between each sensors placed at different points. stucked :(</p>
  
  <pre><code>X=[5 0 0 0 0 5 10 10 10 10 0 5 10 10 0 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 0 5 10 0 5 10 10 10 5 0 0]';
  Y=[10 10 5 5 10 10 5 10 5 10 0 0 0 0 0 0 3.5 7 3.5 7 3.5 7 3.5 7 3.5 7 3.5 7 3.5 7 3.5 7 0 0 0 0 0 0 5 10 10 10 5 ]';
  Z=[20 20 20 14 14 14 14 14 20 20 20 20 20 14 14 14 3.8 3.8 0 0 7.5 7.5 10 10 12.5 12.5 15 15 17.5 17.5 20 20 0 0 0 7.5 7.5 7.5 7.5 7.5 7.5 7.5 7.5]';
  %# temperature vector
  T = [20 22 24 22.1 26.1 22.4 15 17 21 22 19 22 18 17 18 20 21 22 21 24 22.3 22.5 22.8 28.9 22 27 26 20 19 24 21 23 19 18 22 25 27 21 29 25 22 21 22];
  scatter3(X,Y,Z,[4000],T,'.');
  grid off
  box off
  view(32,18); axis equal tight off vis3d; % azimuth 26
  camproj perspective
  camlight; lighting gouraud; alpha(0.75);
  rotate3d on
  </code></pre>
  
  <p>Code below just shows how my one side of 3d rectangle should look like(its just a random code)</p>
  
  <pre><code>datagrid = 500*peaks(100);
  R = makerefmat('RasterSize',size(datagrid));
  [aspect,slope,gradN,gradE] = gradientm(datagrid,R);
  figure; axesm eqacyl
  meshm(datagrid,R)
  colormap (jet(64))
  colorbar('vert')
  title('Peaks: elevation')
  axis square
  </code></pre>