Filter löschen
Filter löschen

Convert X,Y,Z column data into equally spacing grid of X,Y and corresponding Z

5 Ansichten (letzte 30 Tage)
have column vector X=m*1; Y=m*1; Z=m*1; (with NaN in between)
Want to convert Z data into regular spacing of X and Y; X ( -90 to 90) and Y(-180 to 180) irrespective of range of the column vectors X and Y.
Kindly help! Thanks!
  5 Kommentare
Bhowmik.U
Bhowmik.U am 12 Okt. 2018
made meshgrid of X and Y [LON LAT]=meshgrip(X,Y); got LON=m*m and LAT=m*m..then?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KSSV
KSSV am 12 Okt. 2018
Bearbeitet: KSSV am 11 Mär. 2022
Let X,Y,Z be your data.
N = 500 ;
xi = linspace(min(X),max(X),N) ;
yi = linspace(min(Y),max(Y),N) ;
[Xi,Yi] = meshgrid(xi,yi) ;
Zi = griddata(X,Y,Z,Xi,Yi) ;

Weitere Antworten (0)

Kategorien

Mehr zu Matrices and Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by