Skip to content

Commit 03c3b54

Browse files
rashedmytPrabhakar Kumar
authored andcommitted
BugFix: Ensure clean MATLAB workspace on first launch
1 parent 4068d83 commit 03c3b54

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

matlab_proxy/matlab/startup.m

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
token = li.getToken();
1414
login_level = 2;
1515
remember_me = true;
16-
com.mathworks.matlab_login.MatlabLogin.saveCacheLoginInfo(first_name, ...
16+
li = com.mathworks.matlab_login.MatlabLogin.saveCacheLoginInfo(first_name, ...
1717
last_name, email_address, user_id, token, profile_id, login_level, ...
1818
remember_me, email_address, display_name);
1919
% Clear all local variables from users workspace.
@@ -28,7 +28,9 @@
2828
% Add-on explorer is not supported in this environment.
2929
% The following settings instructs it to display appropriate error messages when used.
3030
matlab_settings = settings;
31-
matlab_settings.matlab.addons.explorer.addSetting('isExplorerSupported');
32-
matlab_settings.matlab.addons.explorer.isExplorerSupported.PersonalValue = false;
31+
if ~matlab_settings.matlab.addons.explorer.hasSetting('isExplorerSupported')
32+
matlab_settings.matlab.addons.explorer.addSetting('isExplorerSupported');
33+
end
34+
matlab_settings.matlab.addons.explorer.isExplorerSupported.TemporaryValue = false;
3335

3436
clear matlab_settings

0 commit comments

Comments
 (0)