スタンドアロンアプリケーションに実行期限を設定することはできますか?
10 views (last 30 days)
Show older comments
MathWorks Support Team
on 23 Mar 2016
Answered: MathWorks Support Team
on 23 Mar 2016
MATLAB Compiler で作成するスタンドアロンアプリケーションに実行可能な期限(年月日)を設定する方法を教えてください。
Accepted Answer
MathWorks Support Team
on 23 Mar 2016
スタンドアロンアプリケーションに期限を設定する機能は MATLAB Compiler からは提供されておりません。このため、コンパイルをかける.mファイル内でその機能をプログラムとして盛り込む方法になります。
例えば、以下のコードでは、now コマンドにより現在の時刻を取得し、2016 年 5 月 1 日 と比較します。この日付以降になると、プログラムは中断されます。
--------------------
function myexample
n = datenum(2016,5,1); % 使用期限の定義(シリアルな日付データ)
if now > n % 現在の時刻との比較
disp('Cannot run this code.')
return % 実行中断
end
disp('Start myexample')
mesh(peaks)
--------------------
なお、MATLAB Compiler の評価版で作成されたスタンドアロンアプリケーションには、30 日間の実行期限が自動で設定されています。
0 Comments
More Answers (0)
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!