how to write a matlab code for equation I am trying to write

how to write a matlab code for equation?

I am trying to write the following equation to plot on Matlab but it says error in multiplication of exponential func and cosine func.

Please help

x(t)=0.5058*exp(-2*t)*cos(19.9*t+1.44) + 0.066*cos(10*t-0.13255);

Solution

Copy and paste this:

x(t)=0.5058.*exp(-2.*t).*cos(19.9.*t+1.44) + 0.066.*cos(10.*t-0.13255);

I have used a dot (.) before every asterisk (*).

It should work now.

how to write a matlab code for equation? I am trying to write the following equation to plot on Matlab but it says error in multiplication of exponential func a

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site