フィルターのクリア

Reduce Matrix size with interpolated data arrays

10 ビュー (過去 30 日間)
Benyamin Nemati
Benyamin Nemati 2021 年 3 月 10 日
回答済み: Jan 2021 年 3 月 11 日
Hi,
I have a 360*720 precipitation matrix with values in milimeter, and i desire a 180*360 matrix with interpolated data to compare my precipitation with other 180*360 data.
here you can see the original 360*720 plot of my data. please help me on this.
Thank you.

採用された回答

Mathieu NOE
Mathieu NOE 2021 年 3 月 10 日
hello
simply use a 2D interpolation with the appropriate new Xq and Yq vectors
interp2 2-D interpolation (table lookup).
Vq = interp2(X,Y,V,Xq,Yq) interpolates to find Vq, the values of the
underlying 2-D function V at the query points in matrices Xq and Yq.
Matrices X and Y specify the points at which the data V is given.
  2 件のコメント
Benyamin Nemati
Benyamin Nemati 2021 年 3 月 11 日
Thanks for response,
what is V function here ? I just have a matrix and want to reach to another matrix, i dont get the V function.
Mathieu NOE
Mathieu NOE 2021 年 3 月 11 日
V is not a function, it's the Z values
read the help / doc of interp2

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

その他の回答 (1 件)

Jan
Jan 2021 年 3 月 11 日
The mean over neighboring rows and columns is smarter than a linear interpolation, which just omits the intermediate rows and columns:
x = rand(360, 720);
y = x(1:2:end, :) + x(2:2:end, :);
z = (y(:, 1:2:end) + y(:, 2:2:end)) / 4;

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by