Converting the Domain of an Array
7 views (last 30 days)
I have an array of m columns by n rows. The array corresponds to locations on a physical geometry, e.g. the value in cell [1,1] corresponds to the temperature at a physical x and y location. How do I convert my array into a function that can be plotted in the physical domain?
jonas on 5 Dec 2018
Edited: jonas on 5 Dec 2018
Read about scatteredInterpolant and post some data if you need help. Using meshgrid and griddata would probably suffice, but your description leads me to believe scatteredInterpoland is what you're looking for.
Use surf(x,y,z) or contourf(x,y,z) to plot. Note that you must interpolate z to a rectangular grid first, using the functions suggested above.