フィルターのクリア

Redirect standard input to script within MATLAB shell

4 ビュー (過去 30 日間)
Emanuele
Emanuele 2016 年 8 月 14 日
回答済み: Walter Roberson 2016 年 8 月 14 日
I have a MATLAB script that requires a lot of user inputs through the input() function. Since i need to do many trials with this script, i would like to automate such inputs. In the bash shell, this is possible with something like: matlab -nodisplay -nosplash -r script_name < input.txt But in the MATLAB shell the operator < seems to be not available for such purpose. I do not want to modify this script because it was not written by me and, since it is long and complex, i have fear to introduce errors. Is there a way to redirect the inputs (like in the bash shell) within the MATLAB shell? Thanks.

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 8 月 14 日
No, there is not. Redirecting input at the shell level is the only option in that circumstance.

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by