行列の次元を揃える方法
20 views (last 30 days)
Show older comments
音の合成を行いたいのですが,2つのwavファイルを読み込んだところもちろん行列の次元が違うためエラーが出ます.解決法を教えていただきたいです.
clear;
[p1,fs]=audioread('40kph_RN.wav');
[p2,fs]=audioread('2000rpm_Knock.wav');
fs=44100;
pp1=p1(1:);
smix=pp1+p2;
soundsc(smix,fs)
Accepted Answer
Kenta
on 25 Jul 2020
clear;clc
load gong.mat;
y1=y*2;
load handel.mat;
y2=y;
y2(1:numel(y1))=y2(1:numel(y1))+y1;
soundsc(y2);
状況を詳しく教えていただきありがとうございます。単に波を足すだけでしたらこのようにすればよいと思います。
0 Comments
More Answers (0)
See Also
Categories
Find more on 相関と畳み込み in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!