extracting required information from the received wave

1 vue (au cours des 30 derniers jours)
Sarwat Rizvi
Sarwat Rizvi le 12 Déc 2019
Modifié(e) : Sarwat Rizvi le 12 Déc 2019
I'm trying to perform demodulation of the received wave at the receiver end. The problem is that after receiving the wave i want to extract my required data from that wave. Could someone please help me with that. I'm sharing the code i've written here. I can't figure out how to cut short my x axis so as to get all my required data and eliminate any unrequired data.
%MATLAB CODE FOR DESIGNING THE RECEIVER
A=5;
f1=150;
fc=500;
fs=8000;
a=audiorecorder;
disp('start')
recordblocking(a,5);
disp('stopped');
y=getaudiodata(a);
% audiowrite('p.wav',y,8000);
% [p,fs]=audioread('p.wav');
% Assign figure number to original recording
N = length(a); % These lines set the x axis of the original plot to time in seconds
dt = 1/fs; % "
t = dt*(0:N-1);
figure(1)
plot(y); % Plot the recorded audio
title('Original Recording'); % Add title to original audio plot
sound(y);
dd=cos(2*pi*f1*t);
fd=dd.*y; %multiplying with high frequency carrier now
figure(2)
plot(t,fd)
%filtering starts here
wn=fc/fs;
[s,t]=fir1(50,wn,'low');
figure(3)
freqz(s,t)
x=filter(s,t,y);
figure(2)
plot(t,x),title('filter')
figure(3)
plot(t,result);

Réponses (0)

Catégories

En savoir plus sur Audio I/O and Waveform Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by