What to do when standard deviation is 0?

5 ビュー (過去 30 日間)
Sukru Yavuz
Sukru Yavuz 2018 年 4 月 5 日
コメント済み: John D'Errico 2018 年 4 月 5 日
Hello everyone, I am trying to calculate the standard deviation of all columns in a dataset. And since some of the observations are identical, the standard deviation is equal to 0. But I am using that results in a multiplication afterwards. That's why I am getting zeros, infinites or NaNs. How can I avoid that?
  2 件のコメント
Christian Dieterich
Christian Dieterich 2018 年 4 月 5 日
Maybe this will help you.
https://de.mathworks.com/matlabcentral/answers/44360-standard-deviation-ignoring-0s-in-matrix
John D'Errico
John D'Errico 2018 年 4 月 5 日
What to do? You can decide to accept that some of these standard deviations are zero, and thus further computations on them will be meaningless. That might mean you need to do something more intelligent afterwards, that handles zeros somehow "properly". But what is up to you, since we are given no clue as to what you are doing.
Or, you can get better data.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by