Professional Documents
Culture Documents
1 Plot of Equation 1, Question 10: Function
1 Plot of Equation 1, Question 10: Function
e-t(u(t)-u(t-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
0.5(u(t+1))
-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