24 Mar 2023

Matlab: Terminate Execution by emulating CTRL+C

收藏到CSDN网摘

This is a really usful trick for GUI development in Matlab. Although Matlab has some advanced methods such as Future object to run the process in background. But a simple method to mimic what the user does by pressing CTRL+C would be nice to have!

7 Mar 2023

Matlab: convert time duration to string

收藏到CSDN网摘

Matlab has its own tic/toc function to measure the running time a peice of code, which is very convenient and widely used by developers. The duration() function along with hours(), minutes(), and seconds() is another way of creating time durations explicitly. All of these duration types need to be converted to string format for displaying purpose. How can/should we convert them properly?