Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nblocks = 6;
- n1 = 1;
- d1 = 1;
- n2 = 3;
- d2 = 1;
- n3 = [5*8 5];
- d3= [8 0];
- n4 = 5;
- d4 = [8 10 3];
- n5 = 3;
- d5 = 1;
- n6 = 1;
- d6 = 1;
- blkbuild;
- q=[ 1 0 0;2 1 0;3 2 -5;4 3 6;5 4 0;6 0 0];
- iu = [1 6];
- iy = 4;
- [A, B, C, D] = connect(a, b, c, d, q, iu, iy);
- [Am, Bm, Cm, Dm] = minreal(A, B, C, D);
- t = 0.1:0.1:40;
- r = ones(length(t), 1);
- p = [ones(length(0.1:0.1:3),1) ; zeros(length(3:0.1:40)-1,1)];
- y = lsim(Am, Bm, Cm, Dm, [r p], t);
- plot(t, p, 'b--', t, r,'b:', t, y, 'b')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement