i really don't like assigning e = exp(1) but if that works thats's fine. I would like to get this function done in a oneliner. here is what i have so far.
clear;
clc;
close all;
% create vector of time values
t = 0.0 : 0.01 : 5.0;
% evaluate function at time points
e = exp(1);
f = 22*cos(15*pi*t)*e.^(-0.5*t);
% plot t vs f(t)
figure(1)
plot(t,f);
xlabel('t (sec)');
ylabel('f(t)');
Error using *
Inner matrix dimensions must agree.
Error in tesst (line 8)
f = 22*cos(15*pi*t)*e.^(-0.5*t);