For the harmonic motion shown Assume that the harmonic motio
For the harmonic motion shown
Assume that the harmonic motion shown is the projection on the imaginary axis (i.e. sine function).
Amplitude (Pa) TTTT TTTT L T/8 Time (sec.)Solution
This can be done using MATLAB by following the below steps
1) Create a set of values to be ploted along the x-axis using the following command. Since we need to specify the lower limit, increment and upperlimit in the command
>>t = [0:0.01:4];
2) We create a set of y values using the below function. 2*pi*t in the equation fixes the frequency of the sine wave and pi/4 set the offset to T/8.
>> y = sin (2 * pi * t + pi/4);
3) Plot the graph with t in x-axis and y in y-axis and set the proper labels
>> plot(t,y); xlabel(\'Time(sec.)\'); ylabel(\'Amplitude(Pa)\');
