Plotting histogram in Matlab Gui
26 views (last 30 days)
Show older comments
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.
0 Comments
Accepted Answer
Image Analyst
on 19 Aug 2013
[counts, binCenters] = hist(sort(averSpectrum),500);
axes(handles.whateverAxesYouWant);
bar(binCenters, counts, 'BarWidth', 1);
grid on;
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!