how to print and fetch input of matlab file from system's CMD? And how to run from command line?
1 次查看(过去 30 天)
显示 更早的评论
How to print matlab output on systems cmd and disable the matlab command window?
2 个评论
回答(1 个)
Walter Roberson
2019-4-23
编辑:Walter Roberson
2019-4-23
matlab -nojvm -nodesktop -r 'try; YOURFUNCTIONNAMEHERE; catch ME; end; quit' < INPUTFILENAMEHERE > OUTPUTFILENAMEHERE
If you are using Mac or Linux with a derivative of the Bourne Shell but not the C Shell, then put
2>&1
at the end of that to redirect stderr.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!