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

1 view (last 30 days)
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?

Accepted Answer

Walter Roberson
Walter Roberson on 7 Sep 2022

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.

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!