MATLAB Transfer Functions and Polynomial Roots: Exercises and Solutions
Published on June 2, 2026
Solve problems involving defining transfer functions and finding polynomial roots, sums, and products using MATLAB. This exercise covers fundamental concepts in control systems and algebra.
Question
Answer
Problem 1: Transfer Functions
% MATLAB script to print transfer functions
% i. First transfer function
num1 = [6 0 9 0]; % Coefficients for 6s^3 + 0s^2 + 9s + 0
den1 = [45 0 7 3]; % Coefficients for 45s^3 + 0s^2 + 7s + 3
H1 = tf(num1, den1);
disp('Transfer Function i:')
disp(H1)
% ii. Second transfer function
num2 = [5 0 0]; % Coefficients for 5s^2 + 0s + 0
den2 = [6 0 23 0 0]; % Coefficients for 6s^4 + 0s^3 + 23s^2 + 0s + 0
H2 = tf(num2, den2);
disp('Transfer Function ii:')
disp(H2)
Problem 2: Polynomial Roots
Since the highest power of
Using the MATLAB command
roots([3 4 2 6]), the approximate roots are:Using the MATLAB command
sum(roots([3 4 2 6])), or by Vieta’s formulas (
The sum is
Using the MATLAB command
prod(roots([3 4 2 6])), or by Vieta’s formulas (
The product is