Question: FS 2 4 - EGR 1 0 2 - Section 8 > Week 5 : In - Class Assignment > Problem 4 : Array and

FS24-EGR 102-Section 8> Week 5: In-Class Assignment >
Problem 4: Array and Plot
0 solutions submitted (max: Unlimited)
Write a MATLAB script that performs the following tasks:
1.) Define the following variables:
Create an array of amplitudes A that includes the values 2,3,4 meters
Angular trequency =(radians per second)
2.) Create a time vector 't' ranging from 0 to 10 seconds, which contains 100 points equally spaced
Calculate the displacement x(t) for each amplitude in A'' using the formula
x(t)=A*cos(*t)
4.) Calculate the velocity v(t) using the formula
v(t)=-A**sin(*t)
5.) Plot the results in a 12 subplot:
In the first plot, graph (t)(displacement) versus t
In the second plot, graph v(t)(velocity) versus t
Include a title, axis labels, and legend for the plots.
Note: x(t) and v(t) signifies that the distance and velocity are function of time. Assign distance to variable x and velocity to variable v.
Script o.
1
FS 2 4 - EGR 1 0 2 - Section 8 > Week 5 : In -

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!