help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to redirect output in octave?


From: Edward C. Jones
Subject: How to redirect output in octave?
Date: Sun, 03 Apr 2005 21:51:54 -0400
User-agent: Debian Thunderbird 1.0.2 (X11/20050331)

I would like to redirect the output of octave to the bit bucket. Here is my attempt:

stdout_real = stdout;
stdout = fopen("/dev/null", "wb");
printf("XXX\n");
fclose(stdout);
stdout = stdout_real;

"XXX" is still printed. How do I redirect stdout or stderr?



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]