How to test non-linearity of array (1x256 double)?

1 visualización (últimos 30 días)
sami ullah
sami ullah el 24 de Oct. de 2020
Respondida: Walter Roberson el 25 de Oct. de 2020
Can i check whether my array of size 1x256 double is a non linear or not.?
For example i have a following array A:
20 40 26 136 51 199 196 29 112 43 201 99 227 241 106 151 220 12 23 215
whether A is non linear or not? how to test the non linearity of A?
  1 comentario
KSSV
KSSV el 25 de Oct. de 2020
What do you mean by non-linearity?
Fit a striaght line and get the regression between the data..is that okay with you?

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 25 de Oct. de 2020
Any vector which is not either constant or monotonically increasing or monotonically decreasing, cannot be linear.
If you consider a linear equation y = a*x + b, and take the derivative of it, y' = a, and take the derivative of that, y'' = 0 . So if you take diff(diff()) of your vector and the result is not 0 to within round-off error then you do not have a linear vector.

Más respuestas (0)

Categorías

Más información sobre Operating on Diagonal Matrices 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