reinf5_1.m

来自「离散控制系统设计的MATLAB 代码」· M 代码 · 共 27 行

M
27
字号
%%%%%%%%%%% Reinforcement Problem 5.1 %%%%%%%%%%%
%   Discrete-Time Control Problems using        %
%       MATLAB and the Control System Toolbox   %
%   by J.H. Chow, D.K. Frederick, & N.W. Chbat  %
%         Brooks/Cole Publishing Company        %
%                September 2002                 %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   ---- Exponential signal ----
%
clear
disp('Reinforcement Problem 5.1')

Ts = 0.05;
kT = [0:Ts:1]';                                    % sampling at 20 Hz
t = [0:0.02:1]';                                   % continuous time
e_k = exp(-3*kT) + kT.*exp(-2*kT) +3*exp(-10*kT);  % sampled signal e(k)
e_t = exp(-3*t) + t.*exp(-2*t) +3*exp(-10*t);      % continuous signal e(t)

figure
dplot(kT,e_k);grid        % plot sampled signal
hold on
plot(t,e_t,'--')          % plot continuous signal with dashes
hold off
xlabel('Time (s)')
title('Reinforcement Problem 5.1: Sampled signal e^*(k) and continuous signal e_(t)')
%%%%%%%%%%

⌨️ 快捷键说明

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