i wanted to plot histogram for following
1 view (last 30 days)
Show older comments
shivraj Krishna kumbhar
on 8 Jun 2015
Edited: Walter Roberson
on 8 Jun 2015
status = [dosing, dosing, dosing, initializing, dosing, dosing, initializing];
I wanted to plot graph like this:
Accepted Answer
Nobel Mondal
on 8 Jun 2015
Edited: Nobel Mondal
on 8 Jun 2015
% Need to convert the input as a cell-array
>> status = {'dosing', 'dosing', 'dosing', 'initializing',...
'dosing', 'dosing', 'initializing'};
>> [count,states] = grp2idx(status);
>> hist(count,unique(count));
>> set(gca,'xTickLabel',states)
0 Comments
More Answers (0)
See Also
Categories
Find more on Histograms in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!