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

2 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

Walter Roberson
Walter Roberson le 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.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by