median line in the histogram of the image

5 次查看(过去 30 天)
Hi I want to add a median line to the histogram and represent that line in different color. How do i do that ?

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Histograms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by