我在GUI中設計了一個存檔按鈕,用來存三維的圖檔,原本2014a以前的版本存檔都沒問題
但是我發現2014b以後用一樣的程式碼下去執行,圖檔會偏移。
存檔鍵程式如下:
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
fn = get(handles.edit5,'string');
savef = figure;
copyobj(handles.axes1,savef);
saveas(savef,[fn,'.jpg']);
close(savef);
想請問要如何解決這個問題,謝謝!