Hi members.For example I have a=[1 2], b=[3 4]. I want to compare two values, and I use bar function. But, I do not know how to combine two values in a plot, print like this figure (Element 9, and 10). Can you help me. Thank you

 채택된 답변

madhan ravi
madhan ravi 2018년 11월 3일

0 개 추천

An example:
y = [75 91 105 123.5 131 150 179 203 226 249 281.5];
bar(y,0.4,'b')
hold on
y1=[75.1 125]
bar([2.5 3.5],y1,0.4,'m')
legend({'1st bar','2nd bar'})

댓글 수: 2

Tran Hoa
Tran Hoa 2018년 11월 3일
Thank you very much.
madhan ravi
madhan ravi 2018년 11월 3일
Anytime :)

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 App Building에 대해 자세히 알아보기

태그

질문:

2018년 11월 3일

댓글:

2018년 11월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by