how to select the desired range of each dimension from the 3d array?

2 ビュー (過去 30 日間)
BN
BN 2019 年 10 月 8 日
コメント済み: BN 2019 年 10 月 8 日
Hello all,
I have 3d double array (precipitation=1439*719*1512) that is:
latitude=1439
longitude=719
time=1512
now I want to select a range from each dimension and build a new array named new_precipitation like this:
latitude range = 1400 to 1439
longitude range = 500-519
time= 700-900
in fact, new_precipitation is 3d array with the size of 39*19*200
how to do this? please help me with this issue.
Best Regards

採用された回答

Adam
Adam 2019 年 10 月 8 日
編集済み: Adam 2019 年 10 月 8 日
new_precipitation = precipitation( 1400:1439, 500:519, 700:900 )
would create what you ask for though it will be 1 bigger in each dimension than you say it should be - 40x20x201.
If your final size is fixed you need to reduce each range by 1 at either end.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by