verifyinstalled.m

来自「This demo shows how to use MATLAB, Optim」· M 代码 · 共 24 行

M
24
字号
function verifyInstalled
%VERIFYINSTALLED Checks for installed products
% VERIFYINSTALLED checks to ensure required products are installed.
% Required products incldue:
%   MATLAB
%   Simulink
%   Optimization Toolbox
%   Genetic Algorithm and Direct Search Toolbox
%   SimMechanics
%   Virtual Reality Toolbox

% Product List
product = {'MATLAB'
           'optimization_toolbox'
           'gads_toolbox'
           'Simulink'
           'SimMechanics'};

% Check for license
for i = 1:length(product)
    if ~license('test',product{i})
        error('You need to have %s installed to run this Demo',product{i})
    end
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?