Run function with input variable from linux terminal
3 ビュー (過去 30 日間)
古いコメントを表示
I would like to run a function from the linux terminal. The function has an input variable of type string. How do I run this specific function with the input variable and how do I add the correct path for the function? The function is a main function and will in turn run other functions. Thank you in advance!!
0 件のコメント
回答 (1 件)
Grzegorz Knor
2011 年 9 月 21 日
Simple example:
matlab -nosplash -nodesktop -r "ezplot('x')"
To run function 'function_name' in 'you directory' type in terminal:
matlab -nodesktop -nosplash -r "cd('your directory');function_name('your string')"
2 件のコメント
Suganth Kannan
2016 年 8 月 7 日
@Erik I highly recommend that you add the -nojvm modifier in front of the -r, so MATLAB will start without starting the Java Virtual Machine, too.
参考
カテゴリ
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!