MATLAB: Problem creating an equation

equation

I am trying to create
f=e^(cos(t))+-2cos(4t)-(sin(t/12))^5
is the below the same thing or do I have to change it?
f=exp^(cos(t))-2*cos(4*t)-(sin(t/12))^5;

Best Answer

f = exp(cos(t)) - 2*cos(4*t) - sin(t/12).^5;
The change to exp() without the ^ is necessary. The change to .^5 instead of ^5 is not necessary if t is a scalar but it is necessary if t is not a scalar.