フィルターのクリア

Blank histogram plot window

7 ビュー (過去 30 日間)
Kevin
Kevin 2012 年 6 月 26 日
Hello,
I have a matrix full of data. I am interested in plotting a histogram of one column of said data. The number of rows in the data is 195,104. This minimum and maximum of the data series are -8.8317e+181 and Infinity, respectively.
Whenever I attempt to plot a histogram of the results, the plot window appears to be empty. Is there a way to properly plot this data? I am not necessarily interested in the outlier values, but more so in the range of -20 to 20. I have tried to limit the x-axis to this range, but the plot sill appears to be empty.
Thank you,
Kevin
  1 件のコメント
Image Analyst
Image Analyst 2012 年 6 月 27 日
It could be that there were lots of outliers - more than any valid values so the y range is huge, compressing all your histogram bars vertically. You may have needed to set ylim() also, in addition to xlim(). But actually, I tlawren's answer better.

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

採用された回答

tlawren
tlawren 2012 年 6 月 26 日
If you are not interested in outliers (data outside of [-20,20]), then set all outliers to NaN's. Something like the following should work.
M(abs(M) > 20) = NaN;
hist(M(:,col));
where M is your data matrix and col is the column you want to plot.
Inf's will cause empty histograms.
  2 件のコメント
Kevin
Kevin 2012 年 6 月 26 日
Sorry, what does M represent in this case?
tlawren
tlawren 2012 年 6 月 26 日
M is your data matrix.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by