MATLAB: Running exe file with inputs exe file Hi, i have a exe file and i run it using system with matlab , but i need to add the inputs (-flag1 value1 -flag2 value2) and i don't know how? Thank you. Best Answer Hi,you can use the system command or the bang operator (!), e.g.!my.exe -flag1 value1 -flag2 value2Or[a,b] = system('my.exe -flag1 value1 -flag2 value2')In the case value is number stores in a variable:[a,b] = system(['my.exe -flag1 ',num2str(value1),' -flag2 ',num2str(value2)]) Related SolutionsMATLAB: How to run exe with argumants using matlab system('myexe.exe parName1 str1 parName2 val2')so pretty much the same command that you run it in command prompt or shell, just put a system around it. MATLAB: Switch Case with Strings Help Planet= input('Planet:', 's'); Related QuestionVariable string in warning dialog bProblem running an exe with path containing spaces, while saving command output[SOLVED] Using global flags to advance in a script
Best Answer