How to publishing script with function
2 ビュー (過去 30 日間)
古いコメントを表示
Is there any way to not run the code on certain sections but still publish the script? For instance is there any way to run all the code but not the function?
0 件のコメント
回答 (1 件)
Jakob B. Nielsen
2020 年 4 月 16 日
Your question is a little vague, but if you mean what I think you mean - namely to compile a script but for the compiled version to only run part of your original script - then you can simply use the isdeployed function. In practical terms it is often easier to use a "is not deployed" syntax.
if ~isdeployed
% run this part if not deployed
else
% when deployed, only run this part.
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!