Matlab: passing carriage return from unix to matlab

时间:2015-07-31 19:28:47

标签: matlab unix command-line carriage-return pid

I am invoking matlab in unix terminal-A with below commandline.

matlab -nosplash -nodisplay -nojvm -nodesktop -r "try;myfunc;end;quit"

myfunc.m file has artype = input('Press 1 for add: \n')

I use process ID and pass the input to matlab from a terminal-B using

echo "1" > /proc/<processID of MATLAB>/fd/0

1 is successfully passed to matlab running in terminal-A. However, since matlab input() expects carriage return to execute next line in .m file. How do I pass carriage return to matlab from unix terminal-B?

0 个答案:

没有答案