I want to find the filtered signal and remove the noise from the discrete received signal from the radar and convirte it to continuos

4 views (last 30 days)
I want to find the filtered signal and remove the noise from the discrete received signal from the radar and convirte it to continuos but when i try to convert an error meassge apper and the filtered signal dosen't meake sence because the threshold is small compearing withe the magitude of the signal
% import the signal received
D= load('Cp2Data1.mat');
Error using load
Unable to find file or directory 'Cp2Data1.mat'.
rec= D.r;
% plot the data
plot(rec);
xlabel('n');
ylabel('rec(n)');
title('recived signal');
% becuase we have white gous we find the aouto corrolation to find the mean
% and standard devison
filt= filter2(rec,rec,'same');
% we take the first 2000 sample to determine the threshold
d= datasample(filt,2000);
m= mean(d);
s= std(d);
% given that PF=10^-3
PF= 10^-3;
q= qfuncinv(PF);
% we calculate t= mean+ standard devison*q where t is the threshold
t= m+s*q;
% we use filter2 to filter the recived signal and find the important data
k= 0:199;
K=1000*sin(0.1*pi*k);
% then we corrolate the recived signal with the
filtered= filter2(K,rec,'same');
con_filtered= c2d(filtered,0.1);
plot(con_filtered);
hold on
yline(t);
Error using c2d (line 52)
Not enough input arguments.
Error in HW EE301 (line 26)
con_filtered= c2d(filtered,0.1);
Thanks

Answers (1)

Paul
Paul on 18 Feb 2023
c2d (Control System Toolbox) or c2d (System Identification Toolbox) requires the first input be a dynamic system model. As far as I can tell the variable 'filtered' is just data.
What is the intended operation on the data? Perhaps there is a different function that should be used.

Community Treasure Hunt

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

Start Hunting!