Basic familiarization about AM and FM,
i have taken my speech to check whether AM or FM properly recover the signal or not, after modulation and demodulation.
Santosh Shah (2021). AM, FM Familiarization (missing part) (https://www.mathworks.com/matlabcentral/fileexchange/17895-am-fm-familiarization-missing-part), MATLAB Central File Exchange. Retrieved .
Here is what is in the file. Is this of any value to anyone except the author?
function s_demod = my_amdemod(s, fc, fs)
% here is the function for demodulating the original signal from the
% modulated signal, s is the modulated signal fc and fs are the same.
% butterworth filter parameter
N = 8 ; % filter order
fcut = fc /2;
% absolute value of the modulated signal
s_abs = abs(s);
% filtering with butterworth
[b, a] = butter(N, 2*fcut / fs, 'low');
s_filt = filter(b, a, s_abs);
% remove the means
s_rmvmn = (s_filt - mean(s_filt));
%biasing the signal aroung -1 and 1 V
s_demod = s_rmvmn / max(abs(s_rmvmn));
If the code (7 lines) belongs to another submission, why not put it there?
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!