我在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);
想请问要如何解决这个问题,谢谢!