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))))

请先登录,再进行评论。

类别

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