Turn off "Improve MATLAB by sending user experience" from the command line

16 ビュー (過去 30 日間)
Leo Simon
Leo Simon 2021 年 5 月 11 日
回答済み: Helder Magalhães 2022 年 2 月 13 日
From this site, I learned that one reason why matlab takes forever to quit is that by default, "Improve MATLAB by sending user experience" is checked in in Preferences -> General. I can turn this off in the GUI, but I'm much prefer to turn it off from the command line, using
com.mathworks.services.Prefs.setBooleanProf
But I don't know how to identify the relevant option name to do this. Could somebody advise please?

回答 (3 件)

Rik
Rik 2021 年 5 月 11 日
Using a function to unwind the settings (casting them to struct), and using comp_struct from the FEX, I found the relevant setting:
s=settings;
w=warning('off','MATLAB:structOnObject');
fn=fieldnames(struct(s.matlab.ddux));
warning(w);
fn=fn(contains(fn,'ddux'));
for n=1:numel(fn)
s.matlab.ddux.(fn{n}).chosen.PersonalValue=0;
end
function s=unwind(s,depth)
%call like this: s=unwind(settings);
if nargin==1,depth=0;end,if depth>10,return,end
w=warning('off','MATLAB:structOnObject');s_=struct(s);warning(w);
fn=fieldnames(s_);
s=struct;
for n=1:numel(fn)
if contains(fn{n},'Parent'),continue,end
if strcmp(fn{n},'SettingsObject'),continue,end
fn_=strrep(fn{n},'.','_');
s.(fn_)=s_.(fn{n});
if contains(class(s.(fn_)),'.')
s.(fn_)=unwind(s.(fn_),depth+1);
end
end
end

Helder Magalhães
Helder Magalhães 2022 年 2 月 13 日
To turn off, the correspondent setting (in matlab.prf) is:
MatlabErrorLogReport=Bfalse

Jan
Jan 2021 年 5 月 11 日
What about setting this parameter through the GUI and comparing
  • C:\Users\<USER>\AppData\Roaming\MathWorks\MATLAB\<VErSION>\matlab.prf
  • C:\Users\<USER>\AppData\Roaming\MathWorks\MATLAB\<VERSION>\matlab.settings

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by