📄 gaussian_trend.m
字号:
%Gaussian trend with carrier freq fc and sample freq fs and chiprate ;
function [f,min_position,max_position,fs]=Gaussian_trend(segma,fc,chiprate)
% clear all
% segma=0.09*10^-10;
segma2=segma^2;
mu=0;
% fc=3939*10^6;
fs=3*fc;
% chiprate=24;
t=-0.4/fc:1/fs:0.5/fc;
max_position=((chiprate*3-1)/fc)+max(t)+mu;
min_position=min(t)+mu;
trend_range=min_position:1/fs:max_position;
f=zeros(1,length(trend_range));
for i=1:chiprate*3
% minf=(((i-1)/fc)+mu+min(t))
% maxf=(((i-1)/fc)+mu+max(t))
% temp_low=find(trend_range<=minf);
% low=temp_low(length(temp_low));
% temp_up=find(trend_range<=maxf);
% up=temp_up(length(temp_up));
p=-exp((-t.^2)/(2*segma2)).*(((t.^2)/segma2)-1)/(sqrt(2*pi*segma2)*segma2);
% f((i-1)*length(t)+1:i*length(t))=(sqrt(2*pi*segma^2)^-1).*exp(-(((t+i*mu)-i*mu).^2)./(2*segma^2));
f((i-1)*length(t)+1:i*length(t))=p;
end
%
% subplot(2,1,1)
% plot(min_position:1/fs:max_position,f);
% grid on;
% subplot(2,1,2)
% stem(1:length(f),f);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -