Overwritable message outputs to commandline window

版本 1.1.0.0 (2.0 KB) 作者: kasim tasdemir
Alternative for 'display' function which can overwrite the previous message if required.
3.0K 次下载
更新时间 2013/12/12

查看许可证

When you use 'display' function it does not overwrite the previous message. With this file, you can overwrite or keep previous message on commandline window. Or you can choose current message to be persistent. You can also append time stamp to the beginning of the message Very simple to use. Check >help dispstat
Ex:
> dispstat('','init'); %one time only init
> dispstat('Begining the process...','keepthis','timespamp');
> for i = 1:100
> dispstat(sprintf('Processing %d%%',i),'timestamp');
> %doing some heavy stuff here
> end
> dispstat('Finished.','keepprev');

Output:

16:41:37 Begining the process...
16:41:37 Processing 100%
Finished.

引用格式

kasim tasdemir (2024). Overwritable message outputs to commandline window (https://www.mathworks.com/matlabcentral/fileexchange/44673-overwritable-message-outputs-to-commandline-window), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2013b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Entering Commands 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Screenshot and description are changed

1.0.0.0