毕业论文基于matlab的计算机仿真说明书.docVIP

  • 4
  • 0
  • 约3.22万字
  • 约 34页
  • 2016-05-16 发布于浙江
  • 举报

毕业论文基于matlab的计算机仿真说明书.doc

例 11 %周期信号(方波)的展开,fb_jinshi.m close all; clear all; N=100; %取展开式的项数为2N+1项 T=1; fs=1/T; N_sample=128; %为了画出波形,设置每个周期的采样点数 dt = T/N_sample; t=0:dt:10*T-dt; n=-N:N; Fn = sinc(n/2).*exp(-j*n*pi/2); Fn(N+1)=0; ft = zeros(1,length(t)); for m=-N:N ft = ft + Fn(m+N+1)*exp(j*2*pi*m*fs*t); end plot(t,ft) 例 12 利用FFT计算信号的频谱并与信号的真实频谱的抽样比较。 脚本文件T2F.m定义了函数T2F,计算信号的傅立叶变换。 function [f,sf]= T2F(t,st) %This is a function using the FFT function to calculate a signals Fourier %Translation %Input is the time and the signal vectors,the length of time must greater %than 2 %Output is the frequency a

文档评论(0)

1亿VIP精品文档

相关文档