How can I compare with daily precipitation data from the day before?

1 回表示 (過去 30 日間)
Chris
Chris 2022 年 9 月 7 日
回答済み: Walter Roberson 2022 年 9 月 7 日
I have 30 years of daily precipitation data.
I want to compare those data with the data from the day before.
A is 10950*1 matrix, then how can I describe the matrix with the day before?

採用された回答

Walter Roberson
Walter Roberson 2022 年 9 月 7 日

diff(A, [], 1)

will calculate the second row minus the first row, then the third row minus the second row, then the 4th row minus the third, and so on.

Results that are positive indicate more precipitation compared to the previous day, negative is less precipitation than the previous day.

その他の回答 (0 件)

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by