One formula in Matlab.

2 Ansichten (letzte 30 Tage)
Artyom
Artyom am 17 Jul. 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] ?

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by