Documentation

执照

Get license number or perform licensing task

Syntax

执照
执照('inuse')
S = license('inuse')
S = license('inuse',feature)
地位= license('test',feature)
许可证(“测试”,特征,toggle)
[status,errmsg] = license('checkout',feature)

描述

执照returns the license number for this MATLAB®product. The return value also can be'demo'for a demonstration version of MATLAB,'student',用于MATLAB的学生版本或'unknown', if the license number cannot be determined.

example

执照('inuse')显示当前MATLAB会话中签出的许可证列表。产品列表按照许可功能名称为字母顺序。这些名称与有效值相同特征input.

example

S= license('inuse')returns an array of structures indicating checked-out licenses and the user name of each person who has a license checked out.

example

S= license('inuse',特征)检查产品是否指定特征is checked out in the current MATLAB session. If the product is checked out, then执照返回已签出的产品名称和用户名。否则,Sare empty.

example

地位= license('test',特征)测试是否存在指定产品的许可证特征.

许可证(“测试”,特征,切换)启用或禁用测试由指定的产品特征,取决于切换.

example

[地位,errmsg] =许可('Checkout',特征)检查指定产品的许可证。如果指定可选的第二个输出参数,errmsg, then执照returns the text of any error message encountered if the checkout is unsuccessful.

例子

collapse all

显示当前使用的许可证列表。

执照('正在使用')
image_toolbox map_toolbox matlab

执照按照许可功能名称以字母顺序显示产品列表下载188bet金宝搏。

Get a list of licenses in use with information about each user.

S = license('正在使用');

执照returns a structure array.

查看first element ofS.

S(1)
ans = feature: 'image_toolbox' user: 'juser'

确定是否正在使用MATLAB的许可证。

S = license('正在使用','matlab')
S =功能:'Matlab'用户:'JSMITH'

If the license is in use, thenSis a structure array with nonempty fields.

确定是否存在用于映射Toolbox™的许可证。

地位= license('test','map_toolbox')
状态= 1

If a license exists, then执照returns1.

Check out a license for Control System Toolbox™.

[status,errmsg] = license('查看','control_toolbox')
状态= 1errmsg = ''

The地位output is1and theerrmsg如果结帐成功,输出为空。

Input Arguments

collapse all

License feature name, specified as a character vector. The增量许可证文件中的行表示有效功能。要找到您的许可证文件,请参阅Where are the license files for MATLAB located?

As an example, this table lists the特征一些常用产品的价值。下载188bet金宝搏

特征价值 MathWorks®Product
'matlab' MATLAB
'SIMULINK' 金宝app®
'control_toolbox' 控制系统工具箱
'Curve_Fitting_Toolbox' Curve Fitting Toolbox™
'Signal_blocks' DSP System Toolbox™
'image_toolbox' 图像处理工具箱™
'Optimization_Toolbox' Optimization Toolbox™
'Distrib_Computing_Toolbox' Parallel Computing Toolbox™
'Signal_Toolbox' Signal Processing Toolbox™
'Stateflow' Stateflow®
'Statistics_Toolbox' 统计和机器学习工具箱™
'Symbolic_toolbox' 符号数学工具箱™

价值s of特征are not case-sensitive.

能够测试产品许可的存在,指定为'使能够'或者“禁用”.

  • If切换is'使能够', then the syntax,许可证(“测试”,功能)returns1when the product license exists and0when the product license does not exist.

  • If切换is“禁用”, then the syntax,许可证(“测试”,功能)总是返回0(不存在产品许可证)针对指定产品。

不te

Disabling a test for a particular product can affect other tests for the existence of the license, not just tests performed by the执照command.

Output Arguments

collapse all

Checked out products, returned as an array of structures, where each structure represents a checked-out license. The structures contain two fields:

  • 特征— license feature name

  • 用户— user name of the person who has the license checked out

如果字段为空,则目前未检查产品。

Test or checkout status, returned as1或者0.

  • When testing for the existence of a license,1表示执照exists, and0表示执照does not exist.

    The existence of a license does not necessarily mean that the license can be checked out or that the product is installed.地位is1even if the license has expired or if a system administrator has excluded you from using the product.

  • When checking out a license,1表示checkout is successful, and0表示执照功能无法查看许可证。

Error message for unsuccessful license checkout, returned as a character vector. If the checkout is successful, thenerrmsg是空的。

在R2006a之前引入

这个话题有帮助吗?