Error in wavwrite documentation
Reported by Federico Miyara
BUG DESCRIPTION:
----------------
There is an error in the documentation for wavwrite. It says:
"The data should be arranged with one channel per column."
When one does so, the resulting file has the correct size but the number of samples and the number of channels are exchanged.
ERROR LOG:
----------
Not applicable
HOW TO REPRODUCE THE BUG:
-------------------------
Fs = 44100;
f = 100;
t = 0:1/Fs:0.1;
// Create stereo signal as two column vectors
x = [sin(2*%pi*f*t'), cos(2*%pi*f*t')];
// Save signal
wavwrite(x, Fs, 'c:\test1.wav')
The resulting file should have 2 channels with 4411 samples each, but it has 4411 channels with two samples each, as revealed by
H1 = wavread('c:\test1.wav', 'info')
Result:
H1 =
1. 4411. 44100. 3.891D+08 8822. 16. 4411. 2.
----
OTHER INFORMATION:
------------------
If instead of arranging the channels as columns we arrange them as rows, it works fine.
Suggestion: change "column" by "row" in the documentation.
Note: The column arrangement is the default requirement in Matlab, but it seems that in Scilab the arrangement has to be as rows.