fig8_20.m
来自「包含了控制理论的各种仿真程序」· M 代码 · 共 33 行
M
33 行
% Fig. 8.20 Feedback Control of Dynamic Systems, 4e
% Franklin, Powell, Emami
%
clear all;
close all;
t = 0:.0005:.1;
w = 60*2*pi;
th = w*t;
yc=cos(th);
plot(t,yc,'-'),grid
axis([0 .1 -1.2 1.2])
hold on
title('Fig. 8.20 Example of aliasing')
xlabel('Time (sec)')
% now do 50 Hz samples of the sinusoid
T=1/50;
ts = 0:T:.1;
ths = w*ts;
ys=cos(ths);
% best fit through the sampled points --
ta = 0:.005:.1;
wa = 10*2*pi;
tha = wa*ta;
ya=cos(tha);
plot(ts,ys,'*',ta,ya,'--')
hold off
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?