php中文网 | cnphp.com

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 433|回复: 0

matlab匹配滤波

[复制链接]

2623

主题

2630

帖子

9317

积分

管理员

Rank: 9Rank: 9Rank: 9

UID
1
威望
0
积分
6572
贡献
0
注册时间
2021-4-14
最后登录
2024-4-25
在线时间
666 小时
QQ
发表于 2022-6-4 10:03:23 | 显示全部楼层 |阅读模式
[mw_shl_code=applescript,true]function[y] = matched_filter(nscat,taup,b,rrec,scat_range,scat_rcs,winid)
eps = 1.0e-16;
time_B_product=b*taup;
if(time_B_product<5)
    fprintf('*******Time Bandwidth product is TOO SMALL*******')
    fprintf('\n Change b and or taup')
    return
end
%
%speed of light
c= 3.e8;
%nunber of samples
n = fix(5*taup*b);
%intialize input ,output ,and replica vectors
x(nscat,1:n)= 0.;
y(1:n) = 0.;
replica(1:n) = 0.;

if winid == 0
    win(1:n)= 1.;
end
if winid == 1
    win =  hamming(n);
end
if winid == 2
    win = kaiser(n,pi);
end
if winid == 3
    win = chabwin(n,60);
end
index = find(scat_range>rrec);
if index~=0
    'Error .Recive window is too large;or scatterers fall outside window'
    return
end
%
%calculate sampling interval
t= linspace(-taup/2,taup/2,n);
replica = exp(1i*pi*(b/taup).*t.^2);
figure(1)
subplot(2,1,1)
plot(t,real((replica)))
ylabel('复制品的真实(部分)')
xlabel('时间(秒)')
grid
subplot(2,1,2)
sampling_interval = taup/n;
freqlimit  = 0.5/sampling_interval;
freq = linspace(-freqlimit ,freqlimit,n);
plot(freq,fftshift(abs(fft(replica))));
ylabel('复制品光谱');
xlabel('以HZ为单位的频率')
grid
for j = 1:1:nscat
    range = scat_range(j);
    x(j, = scat_rcs(j).*exp(1i*pi*(b/taup).*(t+(2*range/c)).^2);
    y = x(j,+y;
end
%
figure(2)
y=y.*win;
plot(t,real(y),'k')
xlabel('以秒为单位的相对延迟')
ylabel('未压缩 回波')
grid
out=xcorr(replica,y);
out  = out./n;
s= taup*c/2;
Npoints = ceil(rrec*n/s);
dist=linspace(0,rrec,Npoints);
delr = c/2/b;
figure(3)
plot(dist,abs(out(n:n+Npoints-1)),'k')
xlabel('以米为单位的目标相对位置')
ylabel('压缩回波')
grid
return
   
[/mw_shl_code]





上一篇:matlab 矩形脉冲
下一篇:matlab雷达距离分辨率
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|php中文网 | cnphp.com ( 赣ICP备2021002321号-2 )51LA统计

GMT+8, 2024-4-25 23:18 , Processed in 0.177537 second(s), 36 queries , Gzip On.

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

申明:本站所有资源皆搜集自网络,相关版权归版权持有人所有,如有侵权,请电邮(fiorkn@foxmail.com)告之,本站会尽快删除。

快速回复 返回顶部 返回列表