how to write equation in matlab ?

2 visualizaciones (últimos 30 días)
Deepu S S
Deepu S S el 23 de Nov. de 2021
Comentada: Deepu S S el 24 de Nov. de 2021

Respuestas (1)

KSSV
KSSV el 23 de Nov. de 2021
If x is your series.
N = length(x) ;
FI = sum(abs(diff(x)))/N ;
  5 comentarios
Image Analyst
Image Analyst el 23 de Nov. de 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))))
Deepu S S
Deepu S S el 24 de Nov. de 2021
Thank you @Image Analyst...now its working

Iniciar sesión para comentar.

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by