c6_pllpost.m
来自「二阶锁相环 m 文件」· M 代码 · 共 47 行
M
47 行
% file: c6_pllpost.m
kk = 0;
while kk == 0
k = menu('Phase Lock Loop Postprocessor',...
'Input Frequency and VCO Frequency','Input Phase and VCO Phase',...
'Frequency Error','Phase Error','Phase Plane Plot',...
'Phase Plane and Time Domain Plots','Exit Program');
if k == 1
plot(t,fin,t,fvco)
title('Input Frequency and VCO Frequency')
xlabel('Time - Seconds'); ylabel('Frequency - Hertz');
pause
elseif k == 2
pvco = phin-phierror;
plot(t,phin,t,pvco)
title('Input Phase and VCO Phase')
xlabel('Time - Seconds'); ylabel('Phase - Radians');
pause
elseif k == 3
plot(t,freqerror);
title('Frequency Error')
xlabel('Time - Seconds'); ylabel('Frequency Error - Hertz');
pause
elseif k == 4
plot(t,phierror);
title('Phase Error')
xlabel('Time - Seconds'); ylabel('Phase Error - Hertz');
pause
elseif k == 5
ppplot
elseif k == 6
subplot(211);
phierrn = phierror/pi;
plot(phierrn,freqerror);
grid;
title('Phase Error Plot')
xlabel('Phase Error /pi'); ylabel('Frequency Error - Hertz');
subplot(212)
plot(t,fin,t,fvco);grid
title('Input Frequency and VCO Frequency')
xlabel('Time - Seconds'); ylabel('Frequency - Hertz');
subplot(111)
elseif k == 7
kk = 1;
end
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?