median line in the histogram of the image

6 views (last 30 days)
Hi I want to add a median line to the histogram and represent that line in different color. How do i do that ?

Accepted Answer

Stephan
Stephan on 1 Dec 2020
A = randn(100,1)
histogram(A)
xline(median(A),'-r','LineWidth',2)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!