You are on page 1of 6

P.

Paredes Street, Sampaloc, Manila 1015


LABORATORY ACTIVITY

MIDTERM
FEEDBACK AND CONTROL SYSTEMS

SUBMITTED TO:
ENGR. JOEY SARMIENTO

SUBMITTED BY:
ROBLES, RHONNEL JOSHUA N.

JANUARY 11 2019
1/11/19 11:36 AM MATLAB Command Window 1 of 1

>> %Robles, Rhonnel Joshua N.

%Exercise 1

t = -10 : 0.01 : 20;


a = zeros(1,length(-10 : 0.01 : 0-0.01));
b = 5*ones(1,length(0 : 0.01 : 20));
x = [a b];
plot(t,x,'+')
>>
>>
%Exercise 2

t = 0 : 0.01 : 20;
a = zeros (1,length(0 : 0.01 : 5-0.01));
b = ones (1,length(5 : 0.01 : 10-0.01 ));
c = zeros (1,length(10 : 0.01 : 15-0.01 ));
d = ones (1,length(15 : 0.01 : 20 ));
x = [a b c d];
plot(t,x,'+')
>>
>>
%Exercise 3
RR = '2*cos(100*pi*t)+1'

RR =

2*cos(100*pi*t)+1

>> ezplot (RR, [0 , 0.1])


>>
CONCLUSION:

In this activity I was able to plot the graphs of the exercises. The plots in MATLAB is
appearing in just a few seconds it is faster to know what a graph looks like here in MATLAB. MATLAB
makes easier to solve a problem. I conclude that MATLAB is very useful in any computations.

You might also like