how to select the desired range of each dimension from the 3d array?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponse acceptée
Adam
le 8 Oct 2019
Modifié(e) : Adam
le 8 Oct 2019
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.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur NetCDF dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!