Hi, i have a exe file and i run it using system with matlab , but i need to add the inputs (-flag1 value1 -flag2 value2) and i don't know how? Thank you.

 採用された回答

Friedrich
Friedrich 2013 年 4 月 19 日

0 投票

Hi,
you can use the system command or the bang operator (!), e.g.
!my.exe -flag1 value1 -flag2 value2
Or
[a,b] = system('my.exe -flag1 value1 -flag2 value2')
In the case value is number stores in a variable:
[a,b] = system(['my.exe -flag1 ',num2str(value1),' -flag2 ',num2str(value2)])

1 件のコメント

biju undarath
biju undarath 2017 年 12 月 5 日
Can I assign flag1=value1 and flag2=value2 before using the system command ? Tried.But It is not reading. Like, flag1=value1 flag2=value2 [a,b]=system('my.exe -flag1 -flag2)

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGet Started with MATLAB についてさらに検索

タグ

質問済み:

2013 年 4 月 19 日

コメント済み:

2017 年 12 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by