One formula in Matlab.

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

0 Stimmen

No. However, you can use
diff(Y) ./ Y(1:end-1)

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Hilfe-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