One formula in Matlab.

2 vues (au cours des 30 derniers jours)
Artyom
Artyom le 17 Juil 2012
Hi everyone. Is there any function in Matlab that can easily calculate such kind of formula (Y[i]-Y[i-1])/Y[i-1] ?

Réponse acceptée

Walter Roberson
Walter Roberson le 17 Juil 2012
No. However, you can use
diff(Y) ./ Y(1:end-1)

Plus de réponses (0)

Catégories

En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by