You are on page 1of 2

>> n1=[1]; d1=[1];

n2=[3]; d2=[1];
n3=[1 0]; d3=[1 1];
n4=[2]; d4=[1];
n5=[30]; d5=[1];
n6=[1]; d6=[1 0];
n7=[25]; d7=[1 1];
n8=[1]; d8=[1 0];
n9=[6]; d9=[1];
n10=[1]; d10=[1];
nblocks=10;
>> nblocks=10;
>> blkbuild
State model [a,b,c,d] of the block diagram has 10 inputs and 10 outputs.
>> q=[1 0 0; 1 -9 0; 3 2 -7; 4 3 -8; 5 4 0; 6 5 0; 7 4 0; 8 6 0; 9 6 0; 10 6 0];
>> impunt=1;
>> output=10;
>> [a,b,c,d]=connect(a,b,c,d,q,impunt,output);
>> [num,den]= ss2tf(a,b,c,d);
>> [num,den]=minreal(num,den);
0 pole-zero(s) cancelled
>> printsys(num,den)

>> n1=[1]; d1=[1];


>> n2=[1]; d2=[1 0];
>> n3=[10]; d3=[1 5];
>> n4=[1]; d4=[1];
>> n5=[1]; d5=[1 2];
>> nblocks=5;
>> blkbuild
State model [a,b,c,d] of the block diagram has 5 inputs and 5 outputs.
>> q=[1 0 0; 2 1 -5; 3 2 0; 4 3 0; 5 3 0];
>> impunt=1;
>> output=4;

>> [a,b,c,d]=connect(a,b,c,d,q,impunt,output);
>> [num,den]= ss2tf(a,b,c,d);
>> [num,den]=minreal(num,den);
0 pole-zero(s) cancelled
>> printsys(num,den)

>> n1=[1]; d1=[1];


>> n2=[10]; d2=[1 5];
>> n3=[1]; d3=[1];
>> n4=[1]; d4=[1];
>> nblocks=4;
>> blkbuild
State model [a,b,c,d] of the block diagram has 4 inputs and 4 outputs.
>> q=[1 0 0; 2 1 -3; 3 2 0; 4 0 0];
>> impunt=1;
>> output=4;
>> [a,b,c,d]=connect(a,b,c,d,q,impunt,output);
>> [num,den]= ss2tf(a,b,c,d);
>> [num,den]=minreal(num,den);
0 pole-zero(s) cancelled
>> printsys(num,den)
>>

You might also like