Creating a movie of histograms in matlab -
i used below code create 2 movies of histographs in matlab:
h1 = figure hold on vid = videowriter('graph.avi');open(vid); t=1:time figure(h1); cla hist(eighsum(t,:),40) currframe = getframe(h1); writevideo(vid,currframe); end close(vid);
and
h2 = figure hold on video = videowriter('graphh.avi');open(video); sizeclu = cell(1,size(clustersize,2)); = 1:numel(sizeclu) sizeclu{i} = [clustersize{:,i}]; figure(h2); cla hist(sizeclu{i}) currframe = getframe(h2); % gets figure 2 writevideo(video,currframe); end close(video);
i want numbers below 1 don't shown in histogram. how can that?
do:
[counts,centers] = hist(eighsum(t,:),40); centers(counts < 1) = []; counts(counts < 1) = []; bar(centers,counts);
Comments
Post a Comment