median line in the histogram of the image

5 vues (au cours des 30 derniers jours)
Malini Bakthavatchalam
Malini Bakthavatchalam le 1 Déc 2020
Hi I want to add a median line to the histogram and represent that line in different color. How do i do that ?

Réponse acceptée

Stephan
Stephan le 1 Déc 2020
A = randn(100,1)
histogram(A)
xline(median(A),'-r','LineWidth',2)
  1 commentaire
Malini Bakthavatchalam
Malini Bakthavatchalam le 1 Déc 2020
i have an image, and the xline is not working for me

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by