how to write equation in matlab ?

1 回表示 (過去 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 Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by