median line in the histogram of the image

9 visualizaciones (últimos 30 días)
Malini Bakthavatchalam
Malini Bakthavatchalam el 1 de Dic. de 2020
Comentada: Malini Bakthavatchalam el 1 de Dic. de 2020
Hi I want to add a median line to the histogram and represent that line in different color. How do i do that ?

Respuesta aceptada

Stephan
Stephan el 1 de Dic. de 2020
A = randn(100,1)
histogram(A)
xline(median(A),'-r','LineWidth',2)

Más respuestas (0)

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by