About resizing the time for specific period using the TRMM climate data

3 ビュー (過去 30 日間)
Pankaj R. Kaushik
Pankaj R. Kaushik 2020 年 8 月 11 日
編集済み: Rishik Ramena 2020 年 8 月 14 日
Hi
I have a dataset of TRMM rainfall data with dimensions 100 * 92 * 228.
100 is latitude, 92 is longitude and 228 is representing the months (start date: 1 Jan, 2000 to 31 Dec, 2019).
I have a separate .mat file (with dimension 195 * 1) for Time which is for 195 months (1 june, 2002 to 31 Aug, 2018).
I want to resize the TRMM dataset from 100 * 92 * 228 to 100 * 92 * 195.
I want to replace the time in my TRMM dataset.
How can i do this ? Please help me with the code to resolve this problem.

回答 (1 件)

Rishik Ramena
Rishik Ramena 2020 年 8 月 14 日
編集済み: Rishik Ramena 2020 年 8 月 14 日
For resizing/extracting the data with respect to the dates given in a different table, joining tables would be helpful. You can also use indexing techniques to extract a part of the table as shown:
% Extract two middle rows of a 2*3*4 matrix
a = reshape(1:24, [2 3 4]);
a(:,:,2:3)
Since you have just mentioned that you need to replace the time in your data, I am assuming that you want to parse the dates in your data which can then be converted to a number of representations. The parsing of dates can be done using the DateStrings argument of the datetime function.

カテゴリ

Help Center および File ExchangeClimate Science and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by