How can I run a MATLAB function using Windows Command Prompt and providing input for the function?

18 ビュー (過去 30 日間)
Hello,
I am trying to execute an .m file containing a function using the Windows command prompt. The function has 3 inputs, how can I execute the file while providing the data for the inputs using the command prompt?
Thank you,

回答 (1 件)

Geoff Hayes
Geoff Hayes 2018 年 9 月 4 日
  8 件のコメント
Mitchell Herndon
Mitchell Herndon 2019 年 10 月 24 日
編集済み: Mitchell Herndon 2019 年 10 月 24 日
How could you format the -r statement to include a try/catch?
Such as
matlab -r "try (code) catch ME (code) end"
Walter Roberson
Walter Roberson 2019 年 10 月 25 日
matlab -r "try (code); catch ME; (code); end"

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by