⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c6_pllpre.m

📁 二阶锁相环 m 文件
💻 M
字号:
% file: c6_pllpre.m
clear all
disp('')
fdel = input('Enter the size of the frequency step in Hertz>');
fn = input('Enter the loop natural frequency in Hertz>');
lambda = input('Enter lambda, the relative pole offset>');
disp('')
disp('Accept default values:')
disp(' zeta = 1/sqrt(2),')
disp(' fs = 200*fn, and')
disp('tstop = 1')
dtype = input('Enter y for yes or n for no >','s');
if dtype =='y'
    zeta = 1/sqrt(2);
    fs = 200*fn;
    tstop = 1;
else
    zeta = input('Enter zeta, the loop damping factor>');
    fs = input('Enter the samping frequency in Hertz>');
    tstop = input('Enter tstop, the simulation runtime>');
end
npts = fs*tstop+1;
t = (0:(npts-1))/fs;
nsettle = fix(npts/10);
tsettle = nsettle/fs;
fin = [zeros(1,nsettle),fdel*ones(1,npts-nsettle)];
phin = [zeros(1,nsettle),2*pi*fdel*t(1:(npts-nsettle))];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -