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

1 次查看(过去 30 天)
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 个评论
KSSV
KSSV 2020-10-25
What do you mean by non-linearity?
Fit a striaght line and get the regression between the data..is that okay with you?

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2020-10-25
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Operating on Diagonal Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by