行列の次元を揃える方法
6 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)
2 Comments
Kenta
on 23 Jul 2020
こんにちは、「音の合成」といっても、具体的にどのような結果がほしいのでしょうか。~の関数にインプットしたい、xxという形にしたい、またはそれが難しければ絵などを添付して説明していただけると回答が得られやすいと思います。
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!