Code covered by the BSD License  

Highlights from
Contemporary Communications Systems Matlab Files

image thumbnail

Contemporary Communications Systems Matlab Files

by

 

Matlab Files in this book

ip_07_11.m
% MATLAB script for Illustrative Problem 11, Chapter 7
clear
echo on
num=[0.01 1];
den=[1 1.01 1];
[a,b,c,d]=tf2ss(num,den);
dt=0.01;
u=ones(1,2000);
x=zeros(2,2001);
for i=1:2000
  x(:,i+1)=x(:,i)+dt.*a*x(:,i)+dt.*b*u(i);
  y(i)=c*x(:,i);
  echo off;
end
echo on;
t=[0:dt:20];
plot(t(1:2000),y)

Contact us