For this homework create an MS Word file and include Matlab

For this homework, create an MS Word file and include Matlab codes and plots.

Using Matlab, plot a sine function, sin(omega t), where co is the frequency of oscillation. Do the followings. Create a time vector, t, from 0 to 10s with a time interval of 0.3s. Create an output vector of sin(2t) using the time vector, t, created in (1). Create another time vector from 0 to 10s with a time interval of 0.01s. Create another output vector of sin(2t) using the time vector created in (3). Plot the two output vectors created in (2) and (4) together on the same plot. Use different line properties. Also, insert labels with units and legend. Using Matlab, simulate motion of an object under an external force of f = sin(2t) Netwon. Assume that the mass of the object is 2 kg and it is initially at rest at the coordinate origin. Using a time vector from 0 to 10s with an interval of 1ms, calculate and plot the velocity of the object. Using the same time vector, calculate and plot the position of the object.

Solution

1)t= 0:0.3:10;; %time interval

2)y=sin(2*t) %output vector

3)t=0:0.1:10;%time intrval.

4)x=sin(2*t) % output vector

5) plot(x,y) % plot of two sin waves on single graph.

As per chegg policy answerd only top 3 questions.

For this homework, create an MS Word file and include Matlab codes and plots. Using Matlab, plot a sine function, sin(omega t), where co is the frequency of osc

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site