How to remove middle part of data on Histogram plot

6 ビュー (過去 30 日間)
Rajesh
Rajesh 2013 年 5 月 2 日
I have plotted Histogram, now I need to remove the middle part of the plotting data on histogram, in details I need to plot only first part i.e 1% to 10% and last part i.e 60% to 100% so, I need to remove middle part i.e 10% area to 60% area on histogram plot, how to do that.
  1 件のコメント
Image Analyst
Image Analyst 2013 年 5 月 2 日
Define "remove". Do you want to simply zero out the middle bins (and they'll plot as a flat line along the axis), or do you want to somehow clip out the middle chunk of the bar chart (in which case you'll have to reassign the tick marks on the x axis)?

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

回答 (1 件)

Iman Ansari
Iman Ansari 2013 年 5 月 2 日
Hi.
I=imread('cameraman.tif');
h=imhist(I);
h(ceil(1/10*256):floor(6/10*256))=0;
bar(h,.2)
  1 件のコメント
Rajesh
Rajesh 2013 年 5 月 2 日
Thanks a lot..

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

カテゴリ

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