i wanted to plot histogram for following
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
shivraj Krishna kumbhar
am 8 Jun. 2015
Bearbeitet: Walter Roberson
am 8 Jun. 2015
status = [dosing, dosing, dosing, initializing, dosing, dosing, initializing];
I wanted to plot graph like this:

Akzeptierte Antwort
Nobel Mondal
am 8 Jun. 2015
Bearbeitet: Nobel Mondal
am 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!