0

From my TCL script I like to open Matlab command window and display if its Matlab win32 or win64.

Therefore I use the following command:

exec {*}matlab -nodisplay -nosplash -nodesktop -r  "arch = computer; fprintf('%s \n', arch')";

However I keep getting error:

arch = computer; fprintf('%s 
                          |
Error: String is not terminated properly.

If I run the same in Matlab no issues.

Could some kindly advice.

Thanks

Anj.

1 Answer 1

1

Tcl is substituting the \n before handing the command to matlab. Escape it:

exec matlab ... -r  "arch = computer; fprintf('%s \\n', arch')"

Or use braces

exec matlab ... -r  {arch = computer; fprintf('%s \n', arch')}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.