Clear Filters
Clear Filters

ライセンスに含まれている製品の Feature 名はどのように取得しますか?

34 views (last 30 days)
MathWorks Support Team
MathWorks Support Team on 10 Jun 2015
ライセンスに含まれている toolbox の feature 名をどのように取得しますか?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 11 Jun 2020
Edited: MathWorks Support Team on 11 Jun 2020
MATLAB の ver コマンドで表示される製品名のライセンス Feature 名を取得するには
MATLAB コマンドウイドウ上で、以下のコマンドを実行します。
productidentifier = com.mathworks.product.util.ProductIdentifier.get('ver コマンドで表示されるtoolbox名');
feature = char(productidentifier.getFlexName())
上記のコマンド全体に大文字と小文字が区別され、toolbox名は、ver コマンドで表示された製品名と同じものを入力し、尚且つシングルクォーテションマークで囲む必要があります。
例えば、Fixed Point DesignerライセンスのFeature名を取得する手順は以下の通りです。
ver
コマンドの結果により、インストール済みのFixed Point Designerライセンスの表示名は
Fixed-Point Designer バージョン xxx (R20xxx)
と表示されます。表示名にはハイフンが入っていることが確認できます。
さらに、上の書式を使用して
productidentifier = com.mathworks.product.util.ProductIdentifier.get('Fixed-Point Designer');
feature = char(productidentifier.getFlexName())
と入力すると、その結果は
feature =
'Fixed_Point_Toolbox'
と表示されます。名前にアンダーバーがついているのが特徴的です。
これでFixed Point DesignerライセンスのFeature名はFixed_Point_Toolboxであることがわかりました。
なお、現在使用している環境でFixed Point Designerライセンスが有効かを調べるには、licenseコマンドを使用し、以下のように入力します。
>> [status,errmsg] = license('checkout','Fixed_Point_Toolbox')
status =
1
errmsg =
0×0 の空の char 配列
この場合、Fixed Point Designerライセンスが有効であることを示しています。
また、feature名から製品名を確認したい場合、以下のように実行します。
('Insert_Feature_Name_Here' に feature 名を入力します。)
com.mathworks.product.util.ProductIdentifier.get('Insert_Feature_Name_Here')
参考サイト:

More Answers (0)

Categories

Find more on 起動と終了 in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!