median line in the histogram of the image

2 Ansichten (letzte 30 Tage)
Malini Bakthavatchalam
Malini Bakthavatchalam am 1 Dez. 2020
Hi I want to add a median line to the histogram and represent that line in different color. How do i do that ?

Akzeptierte Antwort

Stephan
Stephan am 1 Dez. 2020
A = randn(100,1)
histogram(A)
xline(median(A),'-r','LineWidth',2)

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by