how to write equation in matlab ?

조회 수: 2 (최근 30일)
Deepu S S
Deepu S S 2021년 11월 23일
댓글: Deepu S S 2021년 11월 24일

답변 (1개)

KSSV
KSSV 2021년 11월 23일
If x is your series.
N = length(x) ;
FI = sum(abs(diff(x)))/N ;
  댓글 수: 5
Image Analyst
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))))
Deepu S S
Deepu S S 2021년 11월 24일
Thank you @Image Analyst...now its working

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by