0% found this document useful (0 votes)
62 views6 pages

Layout of Labreport

This lab report summarizes tasks completed in MATLAB for a control systems course. The tasks included: (1) computing ratios and roots of polynomials, evaluating functions; (2) using partial fraction decomposition; (3) converting temperatures between Fahrenheit and Celsius using loops; and (4) creating a function to perform temperature conversions. Screenshots were provided as evidence of the code used and results.

Uploaded by

Muhammad Sumeet
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views6 pages

Layout of Labreport

This lab report summarizes tasks completed in MATLAB for a control systems course. The tasks included: (1) computing ratios and roots of polynomials, evaluating functions; (2) using partial fraction decomposition; (3) converting temperatures between Fahrenheit and Celsius using loops; and (4) creating a function to perform temperature conversions. Screenshots were provided as evidence of the code used and results.

Uploaded by

Muhammad Sumeet
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

NUST

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.

You might also like