nohup matlab linux_try.m 1>std.out 2>err.out &
there is only one line in the file linux_try.m, which is
a = magic(5)
but in std.out there are a lot of 'Warning: Error reading character from command line', and in err.out there are a lot of 'Bad file descriptor'.
Can anybody help me? Thanks a lot
"Yuheng " <e2_7...@tom.com> wrote in message
news:ifu0us$i02$1...@fred.mathworks.com...
Try invoking MATLAB with the -r startup option.
http://www.mathworks.com/help/techdoc/matlab_env/f8-4994.html
--
Steve Lord
sl...@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlab.wikia.com/wiki/FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com
Thank you for your suggestion, and the link is very helpful.
With an 'exit' added to the end of the script file, the following command works very well
nohup matlab -r "linux_try" -logfile "data.log" 1>stdout.out 2>err.out &
The only small problem is, if the script is not ended with an 'exit'. Matlab will continuously output error messages such as 'Error reading character from command line' and 'Bad file descriptor' in 'data.log', 'stdout.out' and 'err.out', until the process is killed. Do you have any idea of the reason?
At last, I want to thank you again for all your help!
I am also trying to run a matlab file on the linux command line and have encountered the same problems. The line I enter on the command line is:
nohup matlab -nojvm -r "My_script" > My_script_out.txt&
I have placed the exit command at the end of the file 'My_script' but Matlab seems to go into a never ending loop and prints 'bad file descriptor' in the output file when it finishes executing the matlab script. Has anyone encountered this problem and if so, what is the solution?
"Yuheng" wrote in message <ig1491$5tu$1...@fred.mathworks.com>...
"Siyanda Nazo" <siyand...@gmail.com> wrote in message
news:iojf8e$1gs$1...@fred.mathworks.com...
> Hi all
>
> I am also trying to run a matlab file on the linux command line and have
> encountered the same problems. The line I enter on the command line is:
>
> nohup matlab -nojvm -r "My_script" > My_script_out.txt&
>
> I have placed the exit command at the end of the file 'My_script' but
> Matlab seems to go into a never ending loop and prints 'bad file
> descriptor' in the output file when it finishes executing the matlab
> script. Has anyone encountered this problem and if so, what is the
> solution?
I'm not certain -- you should contact Technical Support for help determining
the cause of this behavior.
--
Steve Lord
sl...@mathworks.com