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] ?

 채택된 답변

Walter Roberson
Walter Roberson 2012년 7월 17일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by