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

2 ビュー (過去 30 日間)
sami ullah
sami ullah 2020 年 10 月 24 日
回答済み: Walter Roberson 2020 年 10 月 25 日
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 Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by