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

1 Ansicht (letzte 30 Tage)
sami ullah
sami ullah am 24 Okt. 2020
Beantwortet: Walter Roberson am 25 Okt. 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 Kommentar
KSSV
KSSV am 25 Okt. 2020
What do you mean by non-linearity?
Fit a striaght line and get the regression between the data..is that okay with you?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 25 Okt. 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.

Weitere Antworten (0)

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by