Using CLI programs in Matlab

I have a program that can be called using the command line. If I call said program, it enters and I can type commands and get return values. I want to call this program from Matlab. However, system() never returns since the cli program blocks the command line. Is there a way to pass arguments to such a program?

回答 (1 件)

DGM
DGM 2021 年 5 月 10 日

0 投票

If this were *nix, you may be able to write an expect script to handle getting into and out of the other CLI program.
man expect
I don't know how this would be done in Windows. I don't know of a pure Matlab way to do this; maybe there is, but nothing comes to mind.

カテゴリ

ヘルプ センター および File ExchangeSoftware Development Tools についてさらに検索

製品

リリース

R2020b

質問済み:

2021 年 5 月 10 日

回答済み:

DGM
2021 年 5 月 10 日

Community Treasure Hunt

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

Start Hunting!

Translated by