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)

Community Treasure Hunt

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

Start Hunting!

Translated by