i wanted to plot histogram for following
조회 수: 1 (최근 30일)
이전 댓글 표시
status = [dosing, dosing, dosing, initializing, dosing, dosing, initializing];
I wanted to plot graph like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150978/image.jpeg)
채택된 답변
Nobel Mondal
2015년 6월 8일
편집: Nobel Mondal
2015년 6월 8일
% 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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!