필터 지우기
필터 지우기

How to make Matlab play a specific sound any time (and every time) an error occurs and a different sound when the code finishes normally?

조회 수: 3 (최근 30일)
I'm looking for a way have sound display every time a specific action occurs, for example a beep when an error occurs and a honk when a code finishes. I know that I could put in try, catch and sound if it all works, but I'm looking for a way to do this so it happens every time always. Another way to conceptualize the problem is that anytime red text appears in the command window, make a beep, and anytime >> appears without red text, make a honk.
I was thinking about using groot and the startup file. But I don't know what specific parameters to call or edit.
I'm hoping this is possible with my rational being that, every time an error occurs anywhere, some code is being called to say "Hey, send some red text to the command window." If I could even just piggy back off that and say "Hey, send some red text to the command window, and also play a beep noise", that would be fantastic.
I'm running MATLAB 2018a on Windows 10 64x

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by