Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Matlab 中使用 Mosek,我想在运行优化问题后抑制任何打印。
我已经设置了param.MSK_IPAR_LOG = 0;。但是,我仍然收到以下消息。
param.MSK_IPAR_LOG = 0;
MOSEK Version 9.2.3 (Build date: ...) Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com Platform: ...
我怎样才能删除它?
echo(0)每次运行时使用mosekopt,例如mosekopt('minimize echo(0)', prob, param)等等。
echo(0)
mosekopt
mosekopt('minimize echo(0)', prob, param)
https://docs.mosek.com/9.2/toolbox/solver-io.html
一种解决方法是计算它显示的字符数,然后删除这些字符。
fprintf(repmat('\b',1,n)); %where n is the number of characters to remove
这不会抑制打印,而是会删除打印的字符。