Plotting histogram in Matlab Gui
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Image Analyst
2013 年 8 月 19 日
[counts, binCenters] = hist(sort(averSpectrum),500);
axes(handles.whateverAxesYouWant);
bar(binCenters, counts, 'BarWidth', 1);
grid on;
3 件のコメント
Image Analyst
2013 年 8 月 19 日
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?
Then look up this link: http://blogs.mathworks.com/videos/category/gui-or-guide/ and this one: http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!