MATLAB: What’s wrong in this code, place of the t

place of variable

there is something wrong in this line:
x(t) = A*e^(-zeta*wn*t)*cos(wn*sqrt(1-zeta)t-fi);
what it is? thankyou

Best Answer

Assuming everything else in your code works, you’re missing a multiplication operator between (1-zeta) and t:
x(t) = A*e^(-zeta*wn*t)*cos(wn*sqrt(1-zeta)*t-fi);
See if substituting this line solves your problem.