[問題] GUIDE 放圖片的問題已回收

看板MATLAB作者 (哈哈)時間14年前 (2011/08/13 01:19), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
% --- Executes just before untitled is made visible. function untitled_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to untitled (see VARARGIN) % Choose default command line output for untitled handles.output = hObject; guidata(hObject, handles); axes(handles.axes1 ); % Switches focus to this axes object. jpeg_name=['pca0n18.jpg']; pic = imread(jpeg_name); image(pic); axis off; 以上是部分程式碼 我已經用guide 拉了很多的axis上去(axes2 axes3....) 然後利用以下程式碼 handles.output = hObject; guidata(hObject, handles); axes(handles.axes1 ); % Switches focus to this axes object. jpeg_name=['圖片名稱.jpg']; pic = imread(jpeg_name); image(pic); axis off; 把圖片放到axis上 但是 當我想要把第二第三張圖片放到 axes2 axes3 上的時候 都不能成功 始終只有axis1有圖片 想過的問題就是我是不是程式碼擺錯 guide 產生出來的程式碼 的地方了? 還是有其他語法上的錯誤 用了很久始終無法 拜託板上各位大大幫忙解答! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.31.176.94

08/13 13:48, , 1F
因為你一直都是switch 到axes1 ->axes(handles.axes1 );
08/13 13:48, 1F
文章代碼(AID): #1EHM2njV (MATLAB)