i wanted to plot histogram for following
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
shivraj Krishna kumbhar
il 8 Giu 2015
Modificato: Walter Roberson
il 8 Giu 2015
status = [dosing, dosing, dosing, initializing, dosing, dosing, initializing];
I wanted to plot graph like this:

Risposta accettata
Nobel Mondal
il 8 Giu 2015
Modificato: Nobel Mondal
il 8 Giu 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 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!