Adding outlier to a matrix
3 ビュー (過去 30 日間)
古いコメントを表示
Hi , I have a matrix of intensities (n*p). I want to add an outlier to it. Do you have any idea about how to simulate an outlier? I was thinking to take the mean of matrix and then multiply it to some very high value?
Do you have any idea ?
0 件のコメント
採用された回答
Star Strider
2014 年 5 月 22 日
I suggest:
M = rand(4,5); % Create data
Msts = [mean(M(:)) std(M(:))];
Outlier = Msts(1)+5*Msts(2);
Define the outlier by a multiple of the standard deviation from the mean. An value of 5*std is quite far out.
8 件のコメント
その他の回答 (1 件)
Roger Wohlwend
2014 年 5 月 22 日
Actually you answered your question yourself. Instead of the mean I would use the maximum value of the matrix. Multiply that number by a certain value. That's all. It is quite easy.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!