how to write equation in matlab ?
조회 수: 2 (최근 30일)
이전 댓글 표시
답변 (1개)
KSSV
2021년 11월 23일
If x is your series.
N = length(x) ;
FI = sum(abs(diff(x)))/N ;
댓글 수: 5
Image Analyst
2021년 11월 23일
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))))
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!