how to zero pad a shorter wav file to the same length of a longer wav file? how to make the length of these wav file equal by zero padding?
9 次查看(过去 30 天)
显示 更早的评论
[x1 fs1]=audioread('1.wav');
[x2 fs2]=audioread('2.wav');
[x3 fs3]=audioread('3.wav');
n1=length(x1);
n2=length(x2);
n3=length(x3);
t1=linspace(0,n1/fs1,n1);
t2=linspace(0,n2/fs2,n2);
t3=linspace(0,n3/fs3,n3);
result:::::::
n1=14838
n2=15774
n3=15065
0 个评论
回答(1 个)
madhan ravi
2018-12-16
n1=length(x1);
n2=length(x2);
n3=length(x3);
N=[n1 n2 n3];
NN=max(N);
t1=linspace(0,n1/fs1,NN);
t2=linspace(0,n2/fs2,NN);
t3=linspace(0,n3/fs3,NN);
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!