Ped*_*o77 6 matlab hang matlab-figure
在Matlab R2016a等待用户输入或暂停时,我无法与数字控件交互,如缩放.在较旧的Matlab版本中不会发生这种情况.
这只发生在之前创建的图形和CLOSED时.使用createFig1 = 0;(无错误)和createFig1 = 1;(错误)运行下面的代码 .
如果出现以下错误,则不会
示例代码:
clearvars; close all;
% If fig1 is created here AND closed, zoom control in fig2 becames unresponsible !
createFig1 = 1;
if createFig1
fig1=figure;
title('Press any key or click to continue...');
disp('Press any key or click to continue...');
k = waitforbuttonpress;
close(fig1); clear fig1;
end
%fig2=figure('units','normalized','outerposition',[0 0 1 1]);
fig2=figure;
plot(randn(1000,1));
title('Fig A');
% #### Bug here if fig1 was created and closed !!!! ####
% #### zoom control gets unresponsible !! ####
disp('Zoom in/out and press any key to select points...')
pause;
Run Code Online (Sandbox Code Playgroud)
如果您正在寻找解决方法,那么没有。
这是 MATLAB R2016a 中的错误,已在 MATLAB R2016b 中修复。
不幸的是,如果这对您来说是一个关键问题,我建议降级或升级您的 MATLAB,应该没问题。
| 归档时间: |
|
| 查看次数: |
446 次 |
| 最近记录: |