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

 Respuesta aceptada

madhan ravi
madhan ravi el 3 de Nov. de 2018

0 votos

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 comentarios

Tran Hoa
Tran Hoa el 3 de Nov. de 2018
Thank you very much.
madhan ravi
madhan ravi el 3 de Nov. de 2018
Anytime :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre App Building en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 3 de Nov. de 2018

Comentada:

el 3 de Nov. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by