-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_toolbox.m
19 lines (15 loc) · 918 Bytes
/
install_toolbox.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function install_toolbox()
% Install the MATLAB toolbox from the distribution package. This is for testing only.
% Docs on Toolbox Distribution:
% web(fullfile(docroot, 'matlab/creating-help.html?s_tid=CRUX_lftnav'))
cfdir = fileparts( mfilename('fullpath') ); % Get script directory
toolbox_file_struct = dir(fullfile(cfdir, "*.mltbx")); % determine the prj file name, returns a struct
toolbox_file_full = fullfile(toolbox_file_struct(1).folder, toolbox_file_struct(1).name);
disp("Using toolbox file " + toolbox_file_full);
% install the toolbox
toolbox_struct = matlab.addons.toolbox.installToolbox(toolbox_file_full);
save('toolbox_struct.mat', 'toolbox_struct'); % save toolbox data for later uninstallation
disp("Installed WarningsNG Exporter toolbox");
% print installed addons to the screen to verify the installation
matlab.addons.installedAddons()
end