Pass a parameter vector to an exe file
조회 수: 10 (최근 30일)
이전 댓글 표시
Hi to all, I have a exe file generated from fortran that I need to run in Matlab for different parameters. The exe file require that I input by keyboard the parameter and the option in matlab: system('myprogram.exe') (equivalently ! or dos or unix) work in the same way: need the input by the keyboard. Exist the possibility to pass the input in a different way? I have tried system('myprogram.exe PARAMETER') but doesn't work. Thank you in advance to all. erasmo
댓글 수: 1
Kaustubha Govind
2011년 12월 1일
Did you mean that the executable prompts the user to enter the input? Or does it use command-line arguments? How would you provide the input from a system shell?
채택된 답변
Fangjun Jiang
2011년 12월 1일
try system('myprogram.exe < InputParameters.txt') where InputParameters.txt is a text file that you created ahead of time, just type in the parameters to the text file as if you are type it in command window, include the carriage return.
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
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!