开发者

matlab display messages

开发者 https://www.devze.com 2023-03-03 14:02 出处:网络
sometimes I find that when running matlab scripts messages written through disp() don\'t show up until the script terminates. Is there a way to force the display of msgs during t开发者_运维百科he scri

sometimes I find that when running matlab scripts messages written through disp() don't show up until the script terminates. Is there a way to force the display of msgs during t开发者_运维百科he script?


Try using the fprintf function. If you're displaying the iteration number in a loop everytime, instead of something like disp(['Iteration : ', num2str(i)]), you can simply print the same info as

fprintf('Iteration : %u\n',i)


Try adding a drawnow call after the disp().

0

精彩评论

暂无评论...
验证码 换一张
取 消