Export data based on latitude and longitude from 3 dimension array

1 view (last 30 days)
Dear all Matlab professionals
I have an array named precipitation with 3 dimension (longitude*latitude *time) which it's valued represents precipitation for all around the world at 10*10 degree for 1980 to 2016.
I have 2 question:
  1. how to convert third dimansion unit (time) from days since 1800 to common date unit like 2010-1-1?
  2. how to export data form it for a selected range of latitude and longitude and selected time like 1982-2015?
I attached some information below:
whos lon lat time precipitation
Name Size Bytes Class Attributes
lat 1x18 144 double
lon 1x36 288 double
precipitation 36x18x1512 7838208 double
time 1512x1 12096 double
Thank you all in advance and I'm looking forward to your answers.
Best regards
  2 Comments
BN
BN on 12 Oct 2019
1512 is time data based on unit (days since 1800) which every of this 1512 values reperesnts one month. I attached it.

Sign in to comment.

Accepted Answer

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 12 Oct 2019
Hi Bekzad,
here is the answer:
load time
TT =datetime(t, 'convertfrom', 'excel');
Now TT are dates.
Good luck.
  1 Comment
BN
BN on 12 Oct 2019
Dear Sulaymon Eshkabilov
thank you for your answer. actually I want to convert the time in my 3d array. it is the third dimension of precipitation.
using your above mention code, only time array will be converted and my 3d array doesn't change.
Best regards.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!