W
W
WTFAYD2016-05-15 13:06:10
Audio
WTFAYD, 2016-05-15 13:06:10

How to measure the spectrum and amplitude of a signal in Matlab?

The task goes like this:

Program MatLab to measure the spectrum and amplitude of the audio signal of a smartphone call received by the microphone at the input of the sound card.

It ended up being something like this:
clc; clear all; close all;
recObj = audiorecorder(14000,16,1,1); 
disp('Start speaking.')
recordblocking(recObj, 2);
disp('End of Recording.');
y = getaudiodata(recObj);
xfft = abs(fft(y)); % абсолютное значение от БПФ(быстрое преобразование Фурье) 
plot(xfft);

How to find amplitude?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Murzinov, 2016-05-16
@iDoka

you have in xfft - frequency response.
decide on the frequency at which you need to know the amplitude and everything will work out.
PS: if 16 in audiorecorder is the number of samples, then this is not enough to get good frequency resolution..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question