help-octave
[Top][All Lists]
Advanced

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

Can't write binary data to the standard output


From: Akira Nishimura
Subject: Can't write binary data to the standard output
Date: Tue, 14 Sep 1999 14:49:05 +0900

I'm using octave-2.0.13 and 2.0.14.

I want to write binary data to the standard output. The following
script is that I tested.

#!/usr/bin/octave -q

sf=11025;
t = (1:sf)/sf;
f = 1000;
sig = sin(2*pi*f*t);
fwrite(1, sig, 'int16');

This script outputs nothing, however, chainging fwrite to fprintf, e.g.

fprintf(1, '%g\n', sig);

correctly writes ascii data to the standard output.
                 ^^^^^
How can I write binary data to the standard output?
                ^^^^^^
_/_/_/   _/  _/            _/            _/_/        Akira NISHIMURA
 _/     _/  _/            _/             |    Dept. of Information Systems
_/okyo  _/_/niversity of _/nformation _/_/ciences address@hidden
                   http://www.rsch.tuis.ac.jp/~akira



---------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.  To ensure
that development continues, see www.che.wisc.edu/octave/giftform.html
Instructions for unsubscribing: www.che.wisc.edu/octave/archive.html
---------------------------------------------------------------------



reply via email to

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