matlab code for histogram

조회 수: 3 (최근 30일)
simith
simith 2018년 5월 30일
편집: Akbar 2018년 5월 30일
Hi, I have these two data sets. A=[0.1;0.3;0.5;0.6;0.2] B=[0.8;0.6;0.9;0.4;0.7] I want to plot these two data sets as histograms in a same graph with two different colors for each bars. So please let me know the matlab code.

채택된 답변

Akbar
Akbar 2018년 5월 30일
편집: Akbar 2018년 5월 30일
A=[0.1;0.3;0.5;0.6;0.2];
B=[0.8;0.6;0.9;0.4;0.7];
ax1 = subplot(2,1,1);
a = bar(A,'r');
legend(a,{'A'});
grid on
ax2 = subplot(2,1,2);
b = bar(B,'m');
legend(b,{'B'});
grid on
  댓글 수: 1
simith
simith 2018년 5월 30일
thanks akbar

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by