function simulink2TF(model);

% Create matricies for (linearized) SS model based on block diagram
% gives SYS.a, SYS.b, SYS.c, SYS.d for standard Ax + Bu, Cx + Du SS model
SYS = linmod(model);

TSS = ss(SYS.a,SYS.b,SYS.c,SYS.d);

[num,den] = tfdata(TSS,'v');

disp('Your transfer function is: ')
T = tf(num,den)

