www.gusucode.com > 认知无线电频谱检测技术的研究,有循环检测,周期性检测源码程序 > 程序/a.m
clear N = 100; clear N = 1000; t = 0:10/N:10-10/N; zt = 60*(pdf('Normal', t-8, 0, 0.3) + pdf('Normal', t, 0, 0.8))+rand(1,1000)*3; figure(1); x = 0:100/1000:100-100/1000; plot(x,zt); [X,Y]=meshgrid(-5:0.1:10,-5:0.1:10); xy = [X(:) Y(:)]; p=mvnpdf(xy,[],[]); P=reshape(p,size(X)); [X,Y]=meshgrid(-10:0.1:5,-5:0.1:10); xy = [X(:) Y(:)]; p1=mvnpdf(xy,[],[]); P1=reshape(p1,size(X)); X = 0:160/100:160; Y = 0:160/150:160; PS = P/3+P1; PS = (PS(:,50:150) + randn(151,101)/500)*600; figure(2); surf(X,Y,PS); axis tight