Using Matlab 2016 Solve this Let yt 3e2t for 0 lessthanore
Using Matlab 2016, Solve this :-
Let y(t) = 3e^-2t for 0 lessthanorequalto t lessthanorequalto 5, i. Define a range of values for t with 400 increments. ii. Define the function y(t). iii. Plot y(t) vs t. iv. Show the grid, label the axes and give a title to the plot.Solution
function y = myfun(t)
t = 0:0.0125:5;
y = 3*exp(-2*t);
plot(t,y);
grid on
title (\'y = 3*exp(-2*t)\');
xlabel(\'t\');
ylabel(\'y\');
end
****** save this code in mtlab file named as myfun.m
