Mostrar comentarios más antiguos
clear;
[p1,fs]=audioread('40kph_RN.wav');
[p2,fs]=audioread('2000rpm_Knock.wav');
fs=44100;
p2(448512,[1 2]) = [0,0];
smix=p1+p2;
soundsc(smix,fs)
このような音を二つ重ねた時の周波数特性を表示する方法を教えていただきたいです.基本的なことなのですが,久しぶりにMATLABを触ったため忘れてしまいました.
1 comentario
Kaede
el 6 de Ag. de 2020
Respuestas (1)
Kaede
el 6 de Ag. de 2020
4 comentarios
takemoto
el 7 de Ag. de 2020
合成した後の音の周波数特性を求めるのであれば、"smix"に対してfft演算を行うべきではないでしょうか?
例えば、以下でどうでしょう。
Y = fft(smix,N);
P = abs(Y/N);
frequency = 0 : fs/N : fs - fs/N;
plot(frequency,10*log10(P)), xlim([0,fs/2]), grid
Kaede
el 8 de Ag. de 2020
takemoto
el 17 de Ag. de 2020
別のスレッドで既に解決されている様ですが、fft関数の第二引数を省略することで、入力の全データに対して変換処理を行いますので、この例ですと、
p1_fft=fft(p1,N); ==> p1_fft=fft(p1);
p2_fft=fft(p2,N); ==> p2_fft=fft(p2);
とすればよさそうです。
Kaede
el 17 de Ag. de 2020
Categorías
Más información sobre スペクトル測定 en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!