interp2を使って、海面温度の緯度経度grid dataを、別のgridのものに変換したいと思っています。
・元のデータ
LonとLatは2251×4500、iLon,iLatは90×73のデータです。
[Lon,Lat] = meshgrid(-180:0.08:179.92, -90:0.08:90);
[iLon,iLat]=meshgrid(-177.5:5:177.5, -89.5:2:89.5);
・ほしいデータ
下記のようなibを欲しいと思っています。
bは90×73のデータです。
ib=interp2(Lat(31:31:end,50:50:end), Lon(31:31:end,50:50:end), b(:,1:72)',iLat,iLon);
・Error
入力グリッドは有効な MESHGRID ではありません。
こちら、どのようにすれば解決しますでしょうか。ご教示くださると幸いです。
よろしくお願いいたします。

 Respuesta aceptada

Shunichi Kusano
Shunichi Kusano el 20 de Abr. de 2022

0 votos

LatとLon、そしてiLat,iLonを入れ替えればとりあえずは動きます。狙った処理になっているかはわからないのでご確認ください。

1 comentario

Hiroki Takeda
Hiroki Takeda el 20 de Abr. de 2022
教えていただきありがとうございました。無事に解決できました。

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Resizing and Reshaping Matrices en Centro de ayuda y File Exchange.

Productos

Versión

R2020b

Etiquetas

Preguntada:

el 20 de Abr. de 2022

Comentada:

el 20 de Abr. de 2022

Community Treasure Hunt

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

Start Hunting!