interpolation shorter vector using a longer vector?

3 ビュー (過去 30 日間)
Fredrick
Fredrick 2014 年 7 月 18 日
回答済み: Fredrick 2014 年 7 月 18 日
Hi all, I have a data set which I need to add latitude longitude values to. I am using time in Julian day from the start of the year the data was collected. The format is:
mat1 = < 4244x1 double > julian day min 110.7598 max 110.8159
mat2 = < 2461x1 double > julian day min 110.7593 max 110.8162
mat3 = < 2461x1 double > latitude
mat4 = < 2461x1 double > longitude
I want to match lat lon onto mat 1 using julian day.
interplat = interp1(mat1,mat2,mat3);
Using the above I get error that vectors are not same length. If I make mat2,3,4 the same as mat1 by adding more data that is outside the time span of mat1 I get all NaN in the output.
Please help!!!
best,
Fred

採用された回答

Fredrick
Fredrick 2014 年 7 月 18 日
this works:
InterpLat = interp1(mat2,mat3,mat1);

その他の回答 (0 件)

製品

Community Treasure Hunt

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

Start Hunting!

Translated by