One formula in Matlab.

1 visualizzazione (ultimi 30 giorni)
Artyom
Artyom il 17 Lug 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] ?

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by