Write a script called “faracha” that plots a vs. b as defined in the following equations:
a = sin(t)[ecos(t) – 2cos(4t) – (sin(t/12)5)]
b = cos(t)[ ecos(t) – 2cos(4t) – (sin(t/12)5)]
Where t = [-10;10]. Use 0.01 interval for t. Use 0.01 intervals for t.
import math
import numpy as np
time = np.arange(-10, 10, 0.01) #this creates a numpy array time
having elements between -10 to 10 in the interval of 0.1
# like -10, -9.99, -9.98,.......,0,.......9.98, 9.99, 10
a = []
b = []
for t in time:
a.append(math.sin(t) * (math.exp(1)*math.cos(t) - 2*math.cos(4*t) -
(math.sin(5*t/12)))) #it creates a list of x elements
b.append(math.cos(t) * (math.exp(1)*math.cos(t) - 2*math.cos(4*t) -
(math.sin(5*t/12)))) #it creates a list of y elements
import matplotlib.pyplot as plt #module for plotting graph
x = a
y = b
print(plt.plot(x,y)) #plots the graph
#####
output:
[<matplotlib.lines.Line2D object at 0x0000013401D9C2B0>]
the above functions creates flower like structures
Write a script called “faracha” that plots a vs. b as defined in the following equations:...
(USING MATLAB) Given two differential equations X= sin(t)(exp(cos(t))-2cos(4t)+sin(t/12)^5) And Y = cos(t)(exp(cos(t))-2cos(4t)+sin(t/12)^5) where 0<t<20pi is a vector of 5000 points created by using (linspace) command : Write script to plot X and Y with red color ?
4. Given (x)=x-5x + 5x5x2 - 6x , write a symbolic MATLAB script that: (a) plots g(x) in the interval -2 <x< 4, (b) finds and display all of its maxima and minima, (c) evaluates g(x) at the following values of x: -21, 21, 0, 1, 2st and displays the five results. tidad
1) Write a script that plots sin(x), cos(x), tan(x) for x between 0 and 360◦ (or 2π radians) on one graph, adjusts the y axis to range between −10 and +10, and includes a legend identifying each line. 2)Write a Matlab function that sums up a specified number of odd-power terms from the Maclaurin series of sin(x) For example, if you use the function you wrote to sum the first 10 terms for x = 1, you should get 1...
MATLAB,
please provide code script
Objective: Create a function file that animates projectile motion defined by the following equations in a subplot. Your function should accept user inputs of launch speed and launch angle. The output of your function will be a top subplot that displays height (y) as a function of x. The bottom subplot should display the vertical velocity while the projectile is in motion. A video of what your animation should look like is posted with this...
Use your bes judgement on where to place the tile 1. Submit plots of the following functions. Lahel all axes and include a title (and a legend when appropriate). The first two plots are for discrete- time signals. a. 5 cos(π n /6-π/2). Plot this function in a figure by itself. b. I0 sin(π n/6). Plot this function in afigure by itself. c. 5 cos(3 t 6). Plot this function in a figure by itself. d. 10 sin (4 t...
45. *Write a code that plots each of the reaction forces for the beam below: A0 a. Write equations in terms of the beam length, L, applied force, P, and angle of the applied force, B, for each of the reaction forces. b. Write a script in MATLAB that plots the difference forces for angles ranging from 0 to 90°. Assume the beam length remains constant at 10 feet and the applied force always has a magnitude of 15 kips....
Determine the DTFS of (B) only.
1. Determine the DTFS of the following signals. Write a MATLAB program to calculate the coefficients Ck for each of the signals. Plot a) t[n] vs n, and b) Ck vs 2k. (a) 5 points: t[n] = cos(0.3an) (b) 5 points: t[n] = 1 + cos(0.24an) + 3 sin(0.56n)
Convert the following 3 equations to a system using the example
below. The initial value problems and systems do not need to be
solved. The formula from pg 202 is in the form of the example
below.
Convert each of the following to a system: 2/, + 10y' + 12y-4t sin(3t), y(0)-1,y'(0)--2 - You do not have to solve the IVP's or the systems. Use the formula on p. 202 but use matrix notation and letter choices as explained in...
3. (40 Pts.) Write a script which takes the frequency, amplitude and type (sinusoidal, square or triangular) of a function as input from user and plots the function y(t) at output. Hint: In MATLAB, you can generate a sinusoidal function by using "sin", a square function by using "square" and a triangular function by using "sawtooth" functions. User-inputs Select any frequency within the interval FE lkHz, 100 kHz , select the amplitude of the signal "VM" and define the time...
Write a MATLAB function with the following specifications: Input parameter 1: A Input parameter 2: B Input parameter 3: C Input parameter 4: D Output parameter: Sum of the input parameters Time interval: -2T lessthanorequalto t lessthanorequalto 2T Waveform 1 to plot: y(t) = A sin(B(t - c))+D Waveform 2 to plot: y(t) = A cos(B(t - c)) + D Display two plots in vertical fashion on one figure Include all labeling on both plots. Add a grid to both...