how to write equation in matlab ?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/810184/image.png)
0 Kommentare
Antworten (1)
KSSV
am 23 Nov. 2021
If x is your series.
N = length(x) ;
FI = sum(abs(diff(x)))/N ;
5 Kommentare
Image Analyst
am 23 Nov. 2021
I guess you figured it out since you accepted the answer (remove the division by N), but here is the answer assuming N is the length of the x vector:
FI = sum(abs(diff(x)));
or more accurately, assuming we just want to sum up to N and we have no idea how many elements are in x (might be N or might be something else):
FI = sum(abs(diff(x(1:N))))
Siehe auch
Kategorien
Mehr zu Logical 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!