Controls Lab1
Controls Lab1
EEE-325
Lab Report#01
Pre-Lab:
Objectives:
To study the basic commands of MATLAB and understand SIMULINK
environment.
In-Lab Tasks:
Lab Task 1
Plot the function 𝑥𝑥(𝑡𝑡) = 𝑒𝑒𝜆𝜆𝜆𝜆 for λ = −1, −2, −3, −4 and 0 ≤ t < 10 on the same
graph. Also use legend commands and different line styles or colors to label the plots.
t = 0:0.1:10
lem = [-1;-2;-3;-4]
h=exp(lem*t)
plot(t,h)
xlabel('Time')
ylabel('h(t)')
legend("in lab task 1")
Lab Task 2
i. Plot the function x(t) = cos(t) for 0 < t < 4π.
All together:
t = 0:0.1:10
x = sin(t)
subplot(3,1,1)
plot(t,x)
title('sin wave')
t = 0:0.1:10
x1 = cos(t)
subplot(3,1,2)
plot(t,x1)
title('cos wave')
t = 0:0.01:10
x1 = square(t)
subplot(3,1,3)
plot(t,x1)
title('square wave')
Critical Analysis:
In this lab, we overviewed MATLAB & its basic commands & were
able to revise concepts of signals & systems. Other than that we plot
basic cos, sin & square wave by using plot command. Additionally, we
have used xlabel and ylabel to mention that x and y axis and also we use
subplot for more than one graph at a time. We also used legend to show
the name of wave. Furthermore we used the Simulink to build or generate
cosine wave by putting a scope in Simulink.