Matlab 莫塞克:禁止印刷“;MOSEK版本9.2.3…“;

Matlab 莫塞克:禁止印刷“;MOSEK版本9.2.3…“;,matlab,mosek,Matlab,Mosek,我在Matlab中使用Mosek,我想在运行优化问题后抑制任何打印 我已设置param.MSK_IPAR_LOG=0。然而,我仍然得到以下消息打印 MOSEK Version 9.2.3 (Build date: ...) Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com Platform: ... 如何删除它?解决方法是计算它显示的字符数,然后删除这些字符 fprintf(repmat('\b',1,n)); %where n is the n

我在Matlab中使用Mosek,我想在运行优化问题后抑制任何打印

我已设置
param.MSK_IPAR_LOG=0。然而,我仍然得到以下消息打印

MOSEK Version 9.2.3 (Build date: ...)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: ...

如何删除它?

解决方法是计算它显示的字符数,然后删除这些字符

fprintf(repmat('\b',1,n));
%where n is the number of characters to remove
这不会抑制打印,但会删除打印的字符。

每次运行
mosekopt
时使用
echo(0)
,例如
mosekopt('minimize echo(0)'、prob、param)