how to insert image to gui?
40 ビュー (過去 30 日間)
古いコメントを表示
i want to insert image to gui.i created axes and tried to insert.imaged is loaded,but error is ,imaged not loading inside the axes og gui o/p.it opening as separate image window.help needed
0 件のコメント
回答 (2 件)
Romain
2014 年 5 月 22 日
編集済み: Romain
2014 年 5 月 22 日
You can use the function 'axes' to select the axe for your image :
axes(axisHandle)
matlabImage = imread('image.png');
image(matlabImage)
axis off
axis image
if you are using GUIDE, add this code in the OpeningFcn
7 件のコメント
Romain
2014 年 5 月 22 日
Nothing in particular. For Example, I have create a new project in GUIDE : an 'GUI with Axes and Menu' and just add this line in the test_OpeningFcn:
axes(handles.axes1)
matlabImage = imread('C:\UsersDocuments\image.jpg');
image(matlabImage)
axis off
axis image
And it's working perfectly.
erick rafael
2025 年 1 月 19 日
編集済み: erick rafael
2025 年 1 月 19 日

1 件のコメント
Walter Roberson
2025 年 1 月 19 日
It is not clear what you were doing that triggered this message?
That message looks a bit like you might get when attempting to attach an icon to a compiled application.
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!