Vectors must be the same length with .wav file

1 次查看(过去 30 天)

回答(1 个)

MaryD
MaryD 2020-3-31
t = linspace(0, length(y)/fs,length(y));
I think you use linspace in wrong way. "y = linspace(x1,x2,n) generates n points. The spacing between the points is (x2-x1)/(n-1)."
try
t=0:length(y)/fs:length(y)

类别

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