MATLAB code stops unexpectedly

조회 수: 12 (최근 30일)
骐宇
骐宇 2025년 8월 24일
답변: Srikanth_Y 2025년 9월 1일
我使用的是罗技master 3s鼠标,不知道是不是在鼠标滚动过程中自动触发了一些终止运行的命令,请问要如何避免这种情况呢,如何禁用命令行输入以终止代码运行?
I'm using a Logitech Master 3s mouse. I'm wondering if some commands to terminate code are automatically triggered when I scroll. How can I avoid this? How can I disable command line input to terminate code execution?

답변 (1개)

Srikanth_Y
Srikanth_Y 2025년 9월 1일
Hi 骐宇 ,
I understand how annoying it can be when the code stops unexpectedly, especially when just scrolling. Since you are using the Logitech MX Master 3S and working in the MATLAB terminal, here are a few things that might help:
  • Check Mouse Settings: Open Logi Options+ and look at the button and gesture mappings. Make sure none of them are set to Ctrl+C, which is the shortcut MATLAB uses to interrupt code.
  • Test in MATLAB: Try running a simple loop like:
while true
disp('Running...');
pause(1);
end
Then scroll with your mouse. If the loop stops, it’s likely a mouse input is triggering an interrupt.
  • Adjust Scroll Behaviour: In Logi Options+, disable SmartShift and avoid assigning scroll actions to any keyboard shortcuts.
Hope this helps

카테고리

Help CenterFile Exchange에서 编程实用工具에 대해 자세히 알아보기

태그

제품


릴리스

R2024b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!