Question

About <Kuo-Automatic_Control_Systems> The Matlab Practical Homework : 1. Try the following expression and explain its meaning

0 0
Add a comment Improve this question Transcribed image text
Answer #1

X VIEW C:\Users\User PC\Desktop\Untitled.m EDITOR PUBLISH Find Files Compare New Open Save Print Run Section Go To EDIT Break

MATLAB R2019a HOME PLOTS APPS do E O Search Documentation Sign In Analyze Code O Preferences Run and Time Set Path Favorites

clear all; close all; clc;

% (a) solving first one

num=[7 9 12]; % this function creates polynomial in the form 7x^2+9x+12
% note it saves values in workspace it will show u as 7 9 12.

den=conv(poly([0 -7]),[1 10 100]);

% There are two functions conv and poly
% poly([a b c]) function creates a polynomial which has roots as a b and c
% if u execute poly([0 -7]) u will get polynomial as 1 7 0 means it created
% a polynomial as x^2+7x.

% conv(a,b) means convolution of a and b means it is multiplication of two
% polynomials a and b.
% if u execute conv([1 2],[1 2]), it will multiply two polynomials x+2 and
% x+2 and will give u output as x^2+4x+4.
% by executing given ie conv(poly([0 -7]),[1 10 100]), it is multiplying
% two polynomials in which one poly([0 -7]) is one which has roots 0 ans -7
% ie x^2+7x and the other polynomial as [1 10 100] means x^2+10x+100

[A,B,C]=residue(num,den)

% this function is used to get the partial fraction of num/den.
% here A means values numerators in partial fractions like k + a/(x+p)+b/(x+q).
% then A will give u a and b

%here B means values of roots of denominators like k + a/(x+p) +b/(x+q)
%then B will give p and q

%here C is k if numerator has order equal or greater then u will get k

X IEI C:\Users\User PC\Desktop\Untitled2.m* EDITOR PUBLISH VIEW B w Id Files El Compare Go To New Open Save Print Find 1-2-3-

MATLAB R2019a HOME PLOTS APPS do E O Search Documentation Sign In Analyze Code O Preferences Run and Time Set Path Favorites

clear all; close all; clc;

% (b) solving second one

% P1=(s+2)(s+5)(s+6)
% this polynomial refers which has roots -2,-5,-6.
% if u wanna write this polynomial then u have to use command as

A=poly([-2 -5 -6])

% if u wanna solve polynomial by hand and write in form of
% s^3+13s^2+52s+60 then u can directly

B=[1 13 52 60]

%both will give same answer but first one save ur time and work as u can
%directly input the roots.

%if u wanna find roots of polynomial, then u can exexcute command

roots(A)
roots(B)

C:\Users\User PC\Desktop\Untitled2.m X IEI EDITOR PUBLISH VIEW 1-2-3-4-5-6-7-8- w B old Files Run Section Compare Go To New O

MATLAB R2019a HOME PLOTS APPS do E O Search Documentation Sign In Analyze Code O Preferences Run and Time Set Path Favorites

clear all; close all; clc;

% (c) solving third one

% first input the polynomial

A=[5 7 9 -3 2]

% remenber while input u have to arrange in descending order and if any
% power is missing then u have to write 0 like x^3+2x+2, it has x^2 missing
% then u have to write as A=[1 0 2 2]

% to find roots execute

roots(A)

Add a comment
Know the answer?
Add Answer to:
About <Kuo-Automatic_Control_Systems> The Matlab Practical Homework : 1. Try the following expression and explain its meaning....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT