Converting the Domain of an Array

3 ビュー (過去 30 日間)
NH3 2018 年 12 月 5 日
コメント済み: NH3 2018 年 12 月 5 日
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?
  2 件のコメント
NH3 2018 年 12 月 5 日
Interpolate and plot.
Essentially, I am looking to convert the value in cell [1,1] to a solution to a function when x=0 and y=0, the value in cell [2,1] to the solution to the function when x=0 and y =0.25...and so on.



jonas 2018 年 12 月 5 日
編集済み: jonas 2018 年 12 月 5 日
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.
  3 件のコメント
NH3 2018 年 12 月 5 日


その他の回答 (0 件)




Community Treasure Hunt

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

Start Hunting!

Translated by