Effacer les filtres
Effacer les filtres

Plotting histogram in Matlab Gui

2 vues (au cours des 30 derniers jours)
Jonasz
Jonasz le 19 Août 2013
I try to plot a histogram in Matlab Gui using axis control. But nothing change after running code below:
Code:
handles.hist=hist(sort(averSpectrum),500);
guidata(hObject, handles);
What is wrong I have tried almost every combination.

Réponse acceptée

Image Analyst
Image Analyst le 19 Août 2013
[counts, binCenters] = hist(sort(averSpectrum),500);
axes(handles.whateverAxesYouWant);
bar(binCenters, counts, 'BarWidth', 1);
grid on;
  3 commentaires
Image Analyst
Image Analyst le 19 Août 2013
Double click the axes where you want to display the histogram to bring up the property inspector. Then look at the "tag" property. What does it say? Is the value of the tag property "hist" or is it some other word?
Jonasz
Jonasz le 19 Août 2013
I find what happen. It's the same name of variable and tag. Sorry for bothering you but it wasn't so obvious for me

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by