Unable to define ScatteredInterpolant function v

Hi guys,
I have 4 columns of data in csv, that have the x,y,z coordinates and the corresponding Temperature and i want to produce a temperature profile of the cross section at multiple points in the z-axis. I want to plot this data using the scatteredinterpolant function, but i do not have a function v to be defined since i have all the coordinates and the temperature value. So is there any way i can define v or do i have to use another function to give my object a surface/volume so that i can use the volumetric slice to churn out the temperature profile?

2 件のコメント

KSSV
KSSV 2018 年 2 月 20 日
Why you are unable? What error you get?
Nick Low
Nick Low 2018 年 2 月 20 日
Hi KSSV,
i'm not sure what to define for v since i already have the data for x,y,z coordinates as well as the corresponding temperature...

サインインしてコメントする。

 採用された回答

John D'Errico
John D'Errico 2018 年 2 月 20 日

0 投票

v IS the 4th column, thus temperature.
The other variables are your independent variables.
So essentially, scattered interpolant creates a function for you, allowing you to interpolate v(x,y,z).
You can now use it to interpolate that relation for a complete grid of say (x,y) values, at a fixed level of z. That appears to be what you want. Create the grid in (x,y) using meshgrid or ndgrid.
One thing you need to remember is that if the points of your grid lie outside the convex hull of your data, then scatteredInterpolant will generally produce a NaN result for those predictions by default. That is usually a good thing too, because extrapolation is never something done well. You will need to specify an extrapolation method otherwise.

1 件のコメント

Nick Low
Nick Low 2018 年 2 月 20 日
Okay i think i got it! thanks a lot!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

質問済み:

2018 年 2 月 20 日

コメント済み:

2018 年 2 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by