Answer the question
In order to leave comments, you need to log in
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.
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);
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question