How to convert data file from grid-format(lat,lon, time) into a table

1 回表示 (過去 30 日間)
HN
HN 2019 年 5 月 26 日
コメント済み: HN 2019 年 5 月 28 日
I have downloaded precipitation file of U Delaware Dataset in .nc format and opened with the ncread. This file is as follows precip 720×360×1416 Including Lat(360×1), Lon (720×1) and Time(1416×1) for 1901/01-2017/12.
I want to change this file to a table for any year as follows
  1. Cordinate file 2592200×2
  2. Data file 12×2592200
where
720×360=2592200

採用された回答

KSSV
KSSV 2019 年 5 月 27 日
x = 1:10 ;
y = 1:5 ;
[X,Y] = meshgrid(x,y) ;
A = rand(5,10,10) ;
% repeat spatial matrix
X = repmat(X,1,1,10) ;
Y = repmat(Y,1,1,10) ;
iwant = [X(:) Y(:) A(:)]

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by