Using blkbuild with symbolic functions to find the transfer function of a block diagram

52 views (last 30 days)
In the block diagram represented by the following code blocks 1 to 7 are defined as x, where x is a symbolic variable. When the code is executed I get a number of error messages although if n1 through n7 were numeric and not symbolic variables there would be no error. Can someone please explain how the blocks can be expressed as symbolic functions?
syms x
n1 = x; d1 = 1;
n2 = x; d2 = 1;
n3 = x; d3 = 1;
n4 = x; d4 = 1;
n5 = x; d5 = 1;
n6 = x; d6 = 1;
n7 = x; d7 = 1;
nblocks = 7;
blkbuild
q = [1 0 0 0 0; 2 1 -5 0 0; 3 2 -6 0 0; 4 2 -6 3 -7; ...
5 3 0 0 0; 6 3 0 0 0; 7 4 0 0 0]
input = 1; output = 4;
[aa,bb,cc,dd] = connect(a,b,c,d,q,input,output)
[num,den] = ss2tf(aa,bb,cc,dd)
printsys(num,den)

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!