logo资料库

M——B函数.docx

第1页 / 共1页
资料共1页,全文预览结束
%设置采样长度 1671um %对于该参数是否需与维数相应一起修改????? L=3.5e-3; l=0.0000035; %采样间隔 0.204um.采样频率 fs(在此 fs=1/dt=1/l=4.9020e+006)应大于原信 号最高频率 fm(在此 fm=r^nmax)的 2 倍。 N=floor(L/l); g=0.12; gama=1.5; d=1.2; nl=floor(log(1/L)/log(gama)); nmax=floor(log(1/(2*l))/log(gama)); %确定最高级指数,依据采样定理即采样频率 fs=1/dt(此 处 dt=l)不低于信号最高频率 fm(此处为 r^nmax)的 2 倍。 figure('Color',[1 1 1]) x=L:l:2*L; z1=0; for n=nl:nmax %确定最低频率指数 %为什么将 nmax 取为其它的数时结果误差很大? h=g.^(d-1)*(cos(2*pi*gama.^n*x)/gama.^((2-d)*n)); z1=h+z1; end plot((0:1:N)*l*10^6,z1,'k') xlabel('x/um','FontName','Times New Roman','FontSize',16) ylabel('z(x)/m','FontName','Times New Roman','FontSize',16) set(gca,'FontName','Times New Roman','FontSize',16); box off l1=legend('采样区间为(L,2L)'); set(l1,'FontName','Times New Roman','FontSize',16); set(l1,'box','off');
分享到:
收藏