fill a range with specified color

Hi all!
i have these vectors:
%A=[1:5]
%b=[2 2 2 2 2]
%c=[4 4 4 4 4]
plot(A,b,A,c)
how could i plot the the Range (area) between (2 and 4) with a speciefied color for exemple red?

Respuestas (1)

Jos (10584)
Jos (10584) el 25 de Mzo. de 2014
fill([A A],[b c],'r')
help fill

4 comentarios

Rica
Rica el 25 de Mzo. de 2014
thanks for the the help, but it does not work!
Jos (10584)
Jos (10584) el 25 de Mzo. de 2014
why not / what is the problem/error you encounter?
Rica
Rica el 26 de Mzo. de 2014
hi, my goal is that the whole area between the two lines 2 and 4 should be colored.
Thank you
Rica
Rica el 26 de Mzo. de 2014

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 25 de Mzo. de 2014

Comentada:

el 26 de Mzo. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by