i wanted to plot histogram for following

status = [dosing, dosing, dosing, initializing, dosing, dosing, initializing];
I wanted to plot graph like this:

 Accepted Answer

% 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)

More Answers (0)

Categories

Find more on Genomics and Next Generation Sequencing 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!