Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
初级会员
注册日期: 2008-12-09
年龄: 39
帖子: 1
声望力: 0 ![]() |
![]()
大家好,我是个新手,今天编了这样一个程序,想获得与delphi的动态链接库,请问如何获得啊?这个问题有点着急,在线等强人回答~~谢谢!
clf s=load('g:\dsp\wave.dat','-ascii'); mn=size(s); m=mn(1,1); hold on subplot(221) plot(s(1:m,1),s(1:m,2),'b') title('通道1波形'); xlabel('t(s)');ylabel('Voltage(V)'); grid fs=800; N=4096; Nshow=N/12; figure(2) y=fft(s(1:m,2),N); mag=abs(y); f=(0:length(y)-1)'*fs/length(y); subplot(221) plot(f(1:Nshow),mag(1:Nshow)); title('通道1波形的频谱'); xlabel('f(Hz)');ylabel('Amplitude'); grid %窗函数设计 figure(3) wp=0.35; %Normalized frequence fs/2 ws=0.40; %Width of transition band wdelta=ws-wp; %Length of the filter N=ceil(8*pi/wdelta); if rem(N,2)==0 N=N+1; end %Length of the window Nw=N; %Cutoff Frequency of the filter wc=(wp+ws)/2; %Compute the impulse response of ideal filter n=0:N-1; alpha=(N-1)/2; k=n-alpha+0.00001; hd=sin(wc*k)./(pi*k); %Compute time response of the Hamming Window win=hanning(Nw); %Compute acture impulse response of the filter h=hd.*win'; b=h; figure(4) yc1=conv(s(1:m,2),b); Istart=(length(b)-1)/2+1; Iend=length(yc1)-(length(b)-1)/2; subplot(221) %plot(1:length(b)+m-1,yc1); plot(1:m,yc1(Istart:Iend)); title('通道1滤波后的波形'); grid N=2048; Nshow=N/16; figure(5) y1=fft(yc1,N); mag=abs(y1); f=(0:length(y1)-1)'*fs/length(y1); subplot(221); plot(f(1:Nshow),mag(1:Nshow)); title('通道1滤波后波形的频谱'); xlabel('f(Hz)');ylabel('Amplitude'); grid 这是一个低通滤波的程序,想生成动态链接库在delphi里调用,请问如何实现啊?最好能提供直接的源代码,再次感谢!! |
![]() |
![]() |
![]() |
|
|
![]() |
||||
主题 | 主题作者 | 版面 | 回复 | 最后发表 |
[求助]能在scope中保存几次仿真的结果吗? | enigmaice | MATLAB论坛 | 3 | 2009-04-02 17:10 |
[求助]快考试了,不懂混合编程语言 | zjpqddx | MATLAB论坛 | 0 | 2008-12-25 21:52 |
[求助]如何取一段高频信号的包络啊 | xiangrufeia | MATLAB论坛 | 0 | 2008-12-14 20:05 |
[求助]通过网络接口对示波器(TDS3052B)采集数据进行处理 | shendagui001218 | MATLAB论坛 | 3 | 2008-11-29 16:46 |
购买安捷伦信号分析仪和频谱分析仪的用户可同时购买MATLAB软件 - 电子系统设计网 | labfans | MATLAB新闻聚合 | 0 | 2008-11-12 01:00 |