Thursday, November 25, 2021

Calling a Matlab function from Windows command line (cmd)

Calling a Matlab function from a Windows cmd batch file is easy if the function has no string arguments. However if the function takes a string argument, you have to use two single quotes around the argument. Example:

start matlab -nosplash -nodesktop -noFigureWindows -r eval("'myFunction(''fileName.txt'')'")

No comments:

Post a Comment