Question: Help me write a python code It is required to use these toolboxes Math, cmath, numpy, maltplotlib Thabk you!!! Task 1 a ) Define an

Help me write a python code
It is required to use these toolboxes
Math, cmath, numpy, maltplotlib
Thabk you!!! Task 1
a) Define an array named theta that contains values starting at zero and ending with 10 with increments of 100
b) Define an array named y where y=5sin() for each value of theta.
c) Define an array named ind1 by using the numpy.where() command to determine the indices of all elements of y that are greater than 2.
d) Define a logical array named ind2 containing logical indices to all elements of y that are in the range from -2 to 2(inclusive of those bounds).
e) Define a logical array named ind 3 containing logical indices to all elements of y that are less than -2.
f) Plot y as a function of theta, with values of y greater than 2 as black dots, values of y in the inclusive range from -2 to 2 as red dots, and values of y less than 2 as blue dots.
g) Label the plot axes and title the plot appropriately. Set the axis limits so that the velocity data is not located on the edges of the plot.
MAE1090
FALL 2024
Task 2
The horizontal position of an object undergoing damped oscillation is given by:
x(t)=3e-(t)sin(t)
where t is given in seconds and x is given in units of meters.
a) Define an arras named t that contains values starting at 0 and ending with 40 seconds with increments of 0.01 seconds.
b) Define an array named alpha that contains values from 0.5 to 3(in increments of 0.5).
c) Using nested for loops, determine the motion of the object over time (using the array defined in part
a) at each value of alpha (defined in part b) and plot the horizontal position of the object as a function of time (for all values of alpha).
Help me write a python code It is required to use

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!