i wanted to plot histogram for following

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

 采纳的回答

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

类别

在 帮助中心 和 File Exchange 中查找有关 Genomics and Next Generation Sequencing 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by