1

I am having difficulty producing a contour plot from two matrices;

I have one matrix A 9×8 with values (an amount of something), and another matrix 9×8 B where each entry corresponds to a location of an entry in A.

The issue is that the entries do not fall on a rectangular grid.

I'm trying to create a contour plot of the Y-Axis values (from matrix A), based on the X-axis values from matrix B.

I've tried meshgrid (based on the x and y ranges for B), however the values in matrix B are not evenly spaced;

Any help would be greatly appreciated!

Elias Mårtenson
  • 3,820
  • 23
  • 32
Kohen
  • 11
  • 2
  • Do you have this problem : http://stackoverflow.com/questions/16342164/how-to-plot-a-surface-with-a-texture-map – Ander Biguri Nov 19 '14 at 17:41
  • You might have to settle with interpolation. Check [`scatteredInterpolant`](http://www.mathworks.com/help/matlab/ref/scatteredinterpolant-class.html) for more details. – rayryeng Nov 19 '14 at 18:19
  • Indeed, I've managed to come up with a contour using the scatteredInterpolant. However, my contour result is extremely sensitive to how I define my x and y vectors which define my meshgrid. Furthermore, the final contour plot is close, but does not succeed in showing the highest values from my matrix(B). Is it possible to not use a linear interpolation? – Kohen Nov 20 '14 at 22:39

0 Answers0