필터 지우기
필터 지우기

Method to plot two audio files in the same graph of (amplitude Vs. Frequency)

조회 수: 3 (최근 30일)
I want to plot two audio files in one graph to compare the difference in the frequencies. One of the the audio files has background noise, whilst the other audio file has got background+useful sound. I want to determine the frequencies which are not present in the background.
The code that I have plots only for audio file. I want to overlap both audio files into one graph.
I have attached the two audio files and the code.
  댓글 수: 1
Harindu Kodithuwakku
Harindu Kodithuwakku 2018년 5월 12일
Hi, Thank you very much for the answer. but,should I change the length of the both 'wave'files if the two audio files have different recording times? does it change NFFT,Y and f as well?

댓글을 달려면 로그인하십시오.

답변 (1개)

Aditya Salveru
Aditya Salveru 2018년 5월 11일
편집: Aditya Salveru 2018년 5월 15일
Hi Harindu,
You can plot the frequency spectra of both the signals on the same graph by using the command.
hold on
I have done that and attached the code and output. I have added the legend also for your reference.
Hope it helps.
*please change the filenames accordingly.

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by