当前位置:网站首页>信号与系统【x(t)*h(t)=y(t) 求h(t)】附matlab代码
信号与系统【x(t)*h(t)=y(t) 求h(t)】附matlab代码
2022-08-08 19:09:00 【Bwy_1004】
问题描述
根据傅里叶变换性质可得:
编程:
1、求h(t)在t=[-10,10]的近似图像
2、将得到的h(t)与x(t)卷积看看y(t)的样子
代码运行
T0 = 50;
intervalT = 0.001;
t = 0:intervalT:T0;
W0 = 20;
intervalW = 0.001;
w = 0:intervalW:W0;
functionW = zeros(1,length(w));
for i = 1:length(w)
if sin(w(i))>1e-6 %零值判断
functionW(i) = sin(0.5*w(i))^2/(w(i).*sin(w(i)));
else
functionW(i) = 0.25; %趋于零的点取极限0.25
end;
end;
%求h
h = zeros(1,length(t));
for i = 1:length(t)
for j=1:length(functionW)
h(i) = h(i)+functionW(j)*cos(w(j)*t(i))*intervalW;
end;
end;
h=2*h/pi;
%由于h(t)是偶函数 因此将图像翻转到负半轴
t = [-t(end:-1:2),t];
h = [h(end:-1:2),h];
%画h(t)
subplot(2,1,1);
plot(t,h);
%这里验证求出的h(t)和x(t)卷积后的y(t)是什么样子
newT = -10:intervalT:10;
y = zeros(1,length(newT));
for i = 1:length(newT)
time = newT(i);
for tao = -20:0.001:20
hindex = 1+round((tao-t(1))/intervalT);
if time-tao>0 && time-tao<2 && hindex>=1 && hindex<=length(h)
y(i) = y(i)+h(hindex)*0.001;
end;
end;
end;
%画y(t)
subplot(2,1,2);
plot(newT,y);
运行结果
边栏推荐
- 进化的黑产 vs 进击的蚂蚁:支付宝的每一次点击,都离不开一张“图”的守护
- Performance optimization | CPU power management from the perspective of ping delay
- SSM项目整合——综合案例
- 电脑win键没有反应(最全方案)
- Oracle - table
- Azure Neural TTS continues to be updated to help enterprises develop small language markets
- LabVIEW报错“仪器IO助手未正确安装”
- 黑猫带你学Makefile第10篇:如何将未被编译的代码/自己写的驱动编译进uboot
- nyoj714 Card Trick(第六届河南省程序设计大赛)
- PyTorch入门:(四)torchvision中数据集的使用
猜你喜欢
随机推荐
hdu1495 非常可乐 (广搜)
Dry goods: design high concurrency architecture from scratch
hdu2647 N!Again
nyoj714 Card Trick(第六届河南省程序设计大赛)
Why do programmers only close monitor from none computer after work?Look at the answer ~ each big web site
This error is reported when the shake database is started. Is there a problem with the configuration?
智驾科技完成C1轮融资,此前2轮已融4.5亿元
启牛商学院开户是安全的吗?开户靠谱吗?
数据库学习之表的操作
Fortinet new cloud native protection products launched amazon cloud platform of science and technology
使用dedecms自带采集功能的文字过滤与替换
BP neural network
USB CY68013设备描述符识别失败
软件测试主要是做什么的?
Group DETR:分组一对多匹配是加速DETR收敛的关键
Architecture Design Fundamentals
堆排序实现代码
挖财学堂帮开通的证券账户是真的吗?安全吗
Codeforces Round #712 (Div. 2)(CD)
Wps文档云同步如何开启?Wps打开文档云同步的方法