why the histogram wont show in the wanted axes the code has no errors but it wont show
Show older comments
Accepted Answer
More Answers (1)
Image Analyst
on 23 Dec 2022
DON'T use input for the name of a variable because it's already the name of a function that asks the user for a variable. Call it userInput or something. What does this show in the command window
whos a
I'd like to know if the badly-named "a" is actually a gray scale image, an RGB image, or a character array (string).
4 Comments
jana
on 9 Jan 2023
Moved: Image Analyst
on 10 Jan 2023
Image Analyst
on 10 Jan 2023
jana
on 10 Jan 2023
Image Analyst
on 10 Jan 2023
imshow() works on an image, not a histogram object or counts of pixels. Don't use imshow at all. If you want to see the histogram, just use imhist(o) by itself
imhist(o); % "o" is a horrible name for a variable!
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!