positive and negative deflection

1 回表示 (過去 30 日間)
Gonzalo Guerrero
Gonzalo Guerrero 2020 年 6 月 1 日
コメント済み: Gonzalo Guerrero 2020 年 6 月 1 日
Hi,
I need to know when a number deflects to either side of a set up value(i.e. find the row where a value differs from 0+-0.5). I have tried this, but doesn't work:
deflection= find(RF>mean+standardeviation |RF<mean-standardeviation).
Thank you
Gonzalo

採用された回答

Image Analyst
Image Analyst 2020 年 6 月 1 日
mean is a built-in function. It requires an argument, like mean(RF). Then it should work.
mu = mean(RF);
standarDeviation = std(RF);
deflectionAbove = RF > mu + standarDeviation % Logical vector
deflectionBelow = RF < mean - standarDeviation
deflection = deflectionAbove | deflectionBelow; % A logical vector
deflection = find(deflectionAbove | deflectionBelow); % A linear index vector
  1 件のコメント
Gonzalo Guerrero
Gonzalo Guerrero 2020 年 6 月 1 日
Yes!
Thank you! it works!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by