Unable to play simple wav file

조회 수: 2 (최근 30일)
Bolin
Bolin 2012년 7월 19일
답변: Henok 2014년 6월 24일
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?

답변 (2개)

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

댓글을 달려면 로그인하십시오.


Henok
Henok 2014년 6월 24일
>> whos y Fs Name Size Bytes Class Attributes
Fs 1x1 8 double
y 2x395264 6324224 double

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by