Write a MATLAB function called optimizeTrebuchet that optimizes l, 92 (0), and 0. for a given...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a MATLAB function called optimizeTrebuchet that optimizes l₂, 92 (0), and 0. for a given projectile mass m₂ to maximize the range for a given projectile mass. Your function should use MATLAB's fminsearch command, to minimize the negative of the range computed by computeRange. You should watch the plots of the trebuchet motion that are generated as fminsearch calls computeRange to see what it is doing as it explores the trebuchet design- space. Your function should have the following attributes: The function must be called optimize Trebuchet. • The function must take wo input arguments: (1) The projectile mass m₂ in kilograms, and (2) an array containing an initial guess for [1₂, 0₂(0), 0*] in units of meters and degrees. The function must return two output arguments: (1) The maximum range, and (2) an array containing the values of [12. 02(0), 0] that achieve this range. • You should try running your optimization code starting from different initial values of [1₂, 0₂(0), 0*]. Does the code always find the same optimal solution? Once you can optimize the trebuchet for a 50 Kg projectile, try changing the mass and see how that affects the optimal trebuchet setup [12, 0₂(0), 0]. You can also see how sensitive the range it small changes in [1₂, 0₂(0), 0*]. Write a MATLAB function called optimizeTrebuchet that optimizes l₂, 92 (0), and 0. for a given projectile mass m₂ to maximize the range for a given projectile mass. Your function should use MATLAB's fminsearch command, to minimize the negative of the range computed by computeRange. You should watch the plots of the trebuchet motion that are generated as fminsearch calls computeRange to see what it is doing as it explores the trebuchet design- space. Your function should have the following attributes: The function must be called optimize Trebuchet. • The function must take wo input arguments: (1) The projectile mass m₂ in kilograms, and (2) an array containing an initial guess for [1₂, 0₂(0), 0*] in units of meters and degrees. The function must return two output arguments: (1) The maximum range, and (2) an array containing the values of [12. 02(0), 0] that achieve this range. • You should try running your optimization code starting from different initial values of [1₂, 0₂(0), 0*]. Does the code always find the same optimal solution? Once you can optimize the trebuchet for a 50 Kg projectile, try changing the mass and see how that affects the optimal trebuchet setup [12, 0₂(0), 0]. You can also see how sensitive the range it small changes in [1₂, 0₂(0), 0*].
Expert Answer:
Answer rating: 100% (QA)
Solution Here is a MATLAB function called optimizeTrebuchet that optimizes the trebuchet parameters ... View the full answer
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date:
Students also viewed these accounting questions
-
solve the following instance of the 0/1 kropsack problem using dynamic programming approach. Assume that the knapsack capacity is 9. Item 1 3 4 weight 6 2 5 7 Benef $8 $4 $6 $10
-
A great amount of water vapor changes phase to become water in the clouds that form a thunderstorm. Does this process release thermal energy or absorb it?
-
The area of a sector of a circle of radius 12 cm is 100 cm 2 . Find the perimeter of the sector.
-
Consider the conditions of Example 6.4. A laminar boundary layer can be tripped to a turbulent condition at \(x=x_{r}\) by roughening the surface of the plate at \(x_{r}\). Calculate the minimum and...
-
The accompanying flowchart on page 330 summarizes Jenz Corporations processing of sales. Some of the flowchart symbols are labeled to indicate controls and records. For each symbol numbered 1 through...
-
Sharkers Company supplied you with the following information: Share Dividend expected next year (R) Dividend Growth Rate (%) Required Return (%) A 1.10 9 12 B 3.80 6 11 C 0.80 13 17 D 2.60 12 16 E...
-
Table 1.0: List Price, Sale Price and Days to Sell ApartmentsBlue Apartments Red ApartmentsList Price Sale Price Days to Sell List Price Sale Price Days to Sell1 495.0 475.0 130 217.0 217.0 1822...
-
In the model of monopolistic competition, if firms have average cost curves, then opening trade will cause firms to the industry. D) symmetric; more efficient; enter B) different; more efficient;...
-
An asset has a standard deviation of 15% and a market correlation of 0. What is the value of beta?
-
Draw the Bode diagram of the given system. Find the values of wpc, 6M, Wgc, PM. Check the stability of the system. R(S) -> G(s). H(s) = G(s) H(s) y(s) 2,36 (s+1). (s+2) (S+3) Stat
-
The following stem-and-leaf plot represents the lengths, in centimeters, of a sample of 15 Petite Roses, where the leaf are decimals. The decimal point is at the 32 | 3335 33 | 00168 34 | 35 | 1789...
-
Fernando has a salary of $150,000 per annum. He has requested that his employer salary sacrifice $1,000 per month for him. He set this agreement in place in July 2021. It is now 1 July 2023. What are...
-
The current amortized cost of Quail's $340,000 face value bonds is $327,300. If the bonds are retired at 103, what would be the amount Quail would pay its bondholders?
-
During the current year, Madeline gives each of her three grandchildren, Mary, Mike and Molly, cash in the amount of $13,000. In addition, Madeline pays college tuition of $20,000 for Mary and...
-
In Exercises 15 through 30, find the derivative dy/dx. In some of these problems, you may need to use implicit differentiation or logarithmic differentiation. y ex + et -2x 1 + e
-
Write a program to solve the system of equations using implicit Euler. The initial conditions are y 1 (0) = 1 and y 2 (0) = 2. dy1 = yiy dt dy2 dt = (y - y2) (4.6.43) (4.6.44)
-
Answer the following question about this MATLAB function: I get the output x = 0.3333 after one iteration, which is not the correct answer. What is required to fix this code? 1 2 3 4 5 6 7 8 function...
-
Consider a slab of thickness 2W that is initially at a temperature TH. The slab is in contact with a cold reservoir at some temperature TC < TH. The slab has a thermal conductivity k and the heat...
-
Someone who exposes the ethical misdeeds of others in an organization is usually called a/an _________. (a) whistleblower (b) ethics advocate (c) ombudsman (d) stakeholder
-
If a manager fails to enforce a late-to-work policy for all workersthat is, by allowing some favored employees to arrive late without penaltiesthis would be considered a violation of _________. (a)...
-
According to research on ethics in the workplace, _________ is/are often a major and frequent source of pressures that create ethical dilemmas for people in their jobs. (a) declining morals in...
Study smarter with the SolutionInn App