MATLAB: Median line in the histogram of the image

histogrammedian of grey levelxline

Hi I want to add a median line to the histogram and represent that line in different color. How do i do that ?

Best Answer

A = randn(100,1)
histogram(A)
xline(median(A),'-r','LineWidth',2)
Related Question