Unable to play simple wav file

2 Ansichten (letzte 30 Tage)
Bolin
Bolin am 19 Jul. 2012
Beantwortet: Henok am 24 Jun. 2014
I am using the following code:
[y,Fs] = wavread('track.wav');
sound(y,Fs)
to play a track using matlab.
However, I received the following error:
??? Error using ==> playsnd
Data must have one or two columns.
Error in ==> sound at 58
playsnd(y,fs,bits);
What could have possibly caused this problem?

Antworten (2)

Andreas Goser
Andreas Goser am 19 Jul. 2012
Well, it looks like your data has not one or two columns :-)
I suggest that you post the result of
whos y Fs
  1 Kommentar
Jan
Jan am 19 Jul. 2012
Another marvelous example for the smart error messages of Matlab. They are simply worth to read.

Melden Sie sich an, um zu kommentieren.


Henok
Henok am 24 Jun. 2014
>> whos y Fs Name Size Bytes Class Attributes
Fs 1x1 8 double
y 2x395264 6324224 double

Kategorien

Mehr zu Audio I/O and Waveform Generation finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by