我在Matlab中使用Mosek,在运行优化问题后,我想抑制任何打印。
我设定了param.MSK_IPAR_LOG = 0;。然而,我仍然得到以下信息打印。
MOSEK Version 9.2.3 (Build date: ...)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: ...我怎么才能把它移除?
发布于 2020-03-31 19:12:22
每次运行echo(0)时都使用mosekopt,例如mosekopt('minimize echo(0)', prob, param)等等。
发布于 2020-03-31 17:24:01
解决方法是计算它显示的字符数,然后删除这些字符。
fprintf(repmat('\b',1,n));
%where n is the number of characters to remove这并不会抑制打印,但它将移除打印字符。
https://stackoverflow.com/questions/60955732
复制相似问题