Layout of Labreport
Layout of Labreport
LAB REPORT 1
CONTROL SYSTEMS
SUBMITTED TO: Sir Sardar Shazali Sikander. SUBMITTED BY: NS M Sumeet Anjum (357)
LAB REPORT
1
TASK 1:
Let the two polynomials be: P(s)= Q(s)=s+2 Compute using Matlab a) p(s)/q(s). b) roots of p(s) c) p(1) and q(2)
INTROUCTION TO MATLAB.
MATLAB CODE:
syms s ; ps = s^2 + 4*s + 4 ; qs = s + 2 ; ps / qs % (a a = [1 4 4] % roots(a) subs(ps,s,1) %(c subs(qs,s,2) (b
SCREEN SHOT:
TASK 1.2:
Find the partial fraction using Matlab:
MATLAB CODE:
syms s b = [1 6 14 18 11] a = [1 6 11 6] [p q r] = residue(b,a)
1 SCREEN SHOT:
TASK 1.3:
Use for or while loop to convert degree Fahrenheit (T) to degree celsius using the following equation
MATLAB CODE:
for i = 0:10:200 temp_in_Fahrenheit =(((9/5)*i)+32) end
1 SCREEN SHOT:
TASK 1.4:
Write a Matlab m file to obtain value of The function should take as input
MATLAB CODE:
function [t] = temp(c) t = (((9/5)*c)+32) ;
1 SCREEN SHOT:
CONCLUSION:
In this lab we learn to use basic commands to solve polynomials and partial fraction .We also learn about making function.