cindy
Full Member
Posts: 17
|
Post by cindy on Dec 25, 2005 1:12:53 GMT -5
Hi,
I need to run some matlab codes in the background. I remember the command are: ------------------------------------ unsetenv DISPLAY nohup matlab < test.m > test.txt& ------------------------------------
and the testing codes are: (test.m file) -------------------------------- n = 3; fid = fopen('test.txt', 'a'); fprintf(fid, '%-4d\n', n); fclose(fid); --------------------------------
but it doesn't work. I really couldn't find out what is wrong here. Please help!
Thanks in advance.
Cindy
|
|
|
Post by hunter006 on Dec 25, 2005 15:29:40 GMT -5
Hi Cindy, Although I don't have a Unix machine to test these on, it seems to be the way you're calling Matlab. The official Matlab support[1] suggests the unsetenv line is fine, and your file writing code is 100% a-ok, so it's neither one of those. Some commands suggested were: matlab -nodisplay <test.m>& test.txt& and the code under Section 13.2 at www-stat.stanford.edu/computing/comp-guide-13.htmlTry either one of those and please let us know how things go. [hunter006] References: [1] www.mathworks.com/support/solutions/data/1-15HNG.html
|
|
cindy
Full Member
Posts: 17
|
Post by cindy on Dec 30, 2005 23:22:41 GMT -5
I solved the problem in another way.
Cindy
|
|