Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Plot of Equation 1, Question 10 1 0.9 0.8 0.

e-t(u(t)-u(t-2))

0.6 0.5 0.4 0.3 0.2 0.1 0 -2

-1.5

-1

-0.5

0 t

0.5

1.5

function [ x ] = equation1( t ) %Problem Set #1 %Question 10: %Graph the equations on a labeled plot with %enough points to accurately describe equation. %Create the function using the unit step x= inline('exp(-t).*(t>=0&t<1)','t'); %Create the time interval, make sure that there are enough sampling points. t= (-2:0.0001:2); %Plot the graph and label the axes. plot(t,x(t)); xlabel('t'); ylabel('e^-t(u(t)-u(t-2))'); title('Plot of Equation 1, Question 10');

end

Plot of Equation 2, Question 10 0.5 0.45 0.4 0.35

0.5(u(t+1))

0.3 0.25 0.2 0.15 0.1 0.05 0 -2

-1.5

-1

-0.5

0 t

0.5

1.5

function [ x ] = equation2( t ) %%Graph the equations on a labeled plot with %enough points to accurately describe equation. %Create the function using the unit step x= inline('0.5.*(t>1)','t'); %Create the time interval, make sure that there are enough sampling points. t= (-2:0.0001:2); %Plot the graph and label the axes. plot(t,x(t)); xlabel('t'); ylabel('0.5(u(t+1))'); title('Plot of Equation 2, Question 10');

end

You might also like