Question

Generate code with matlab please and thank you. The braking distance of a car depends on...

Generate code with matlab please and thank you.

The braking distance of a car depends on its speed as the brakes are applied and on the car’s braking efficiency. A formula for the braking distance is

where bd is the braking distance, s is the car’s speed, R is the braking efficiency and g is the acceleration due to gravity (9.81). Write a a script that calls a function to prompt the user for s and R, that function call another functions to calculate the braking distance, and then outputs the the braking disctance. Next write a plottting function that will plot the braking distance for speeds varying from 0 to 100 m/s in increments of 5.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A formuta for the braking cdistance 2 R functton CsR)ProSandRC) end functior 81 end function Pnt bl. m endSCAPL catcatate poakir Disterce ro t catti function catcbdo to catcutale the % catting the Distance and te coe-Paste che abav

Add a comment
Know the answer?
Add Answer to:
Generate code with matlab please and thank you. The braking distance of a car depends on...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • MATLAB s are applied 26. The braking distance of a car depends on its speed as...

    MATLAB s are applied 26. The braking distance of a car depends on its speed as the brakes are appiet and on the car's braking efficiency. A formula for the braking distance is s2 ba_2Rg where ba is the braking distance, s is the car's speed, R is the braking efficiency, and g is the acceleration due to gravity 19.81).A script has been written that calls a function to prompt the user for s and R, calls another function to...

  • can you answer both #1 (a&B) and #2 please 1. Write MATLAB code to do the...

    can you answer both #1 (a&B) and #2 please 1. Write MATLAB code to do the following: (4 pts) a) Find the area of the circles where r=[7, 8, 10] using A = tr2 b) Find the distance traveled by a ball falling in the air is given by the equation x=x0+vot+ at?. Calculate the position of the ball at time t = 5s, XO = 10m, vo= 15 m/s, and a = 9.81 m/sec^2. Write MATLAB code to accomplish...

  • Please code in MatLab or Octave Output should match Sample Output in the second picture Thank...

    Please code in MatLab or Octave Output should match Sample Output in the second picture Thank You 4. In this problem we will investigate using loops to calculate the product of two matrices. Given an mxn matrix A and an n x p matrix B, the matrix product C = AB is the m xp matrix with Cij = R=1 Qikbky. Write a program which calls a function get matrix.dimensions which should • print a description of the purpose of...

  • PART C PLEASE!!! IF YOU KNOW HOW TO CODE MATLAB PLEASE HELP THANK YOU Write a Matlab/Python scrip...

    PART C PLEASE!!! IF YOU KNOW HOW TO CODE MATLAB PLEASE HELP THANK YOU Write a Matlab/Python script which computes the trajectory of P according to the system of equations (1) and the corresponding (non-dimensional) range for given values of (α,φ,0), varying values of φ 0 Plot the trajectories for 6 values of φ 0 of your choice in the interval 0< φ0 π/2. Compute the corresponding range reached by each trajectory. Note: Special attention will be given to the...

  • Please code in MatLab or Octave Output should match Sample Output in Second Picture Thank you...

    Please code in MatLab or Octave Output should match Sample Output in Second Picture Thank you 5. In this problem we will investigate using the Secant Method to approximate a root of a function f(r). The Secant Method is an iterative approach that begins with initial guesses , and r2. Then, for n > 3, the Secant Method generates approximations of a root of f(z) as In-1-In-2 n=En-1-f (x,-1) f(Fn-1)-f(-2) any iteration, the absolute error in the approximation can be...

  • MATLAB, please provide code script Objective: Create a function file that animates projectile motion defined by...

    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...

  • I want the math lab code for theses problems in a unique way

    I want the math lab code for theses problems in a unique way Theory A projectile is launched from point A up an incline plane that makes an angle of 10 with the horizontal. The mountain is 6,000 m high. Vo 10° Figure 1: Flightpath of a projectile. If we neglect the air resistance, the flight path of a projectile launched at an initial speed vo and an angle θ of departure relative to the horizontal is a parabola (see...

  • Using MATLAB. As an engineer working on designing and modelling a new drone product, you are...

    Using MATLAB. As an engineer working on designing and modelling a new drone product, you are doing a lot of different physics calculations. Your boss wants to write a program that can choose from an assortment of calculations and perform the desired physics calculation in order to streamline the design and modelling process. For this project you will write a function called PhysicsCalc. inputs Your function should take three inputs in the following order: var1–The first number in the calculation...

  • read instructions carefully please matlab only Write a MATLAB function for a BMI calculator that receives the inputs for body weight (lbs)and height (ft) from the user's program, calculates th...

    read instructions carefully please matlab only Write a MATLAB function for a BMI calculator that receives the inputs for body weight (lbs)and height (ft) from the user's program, calculates the BMI using the equation below, displays the BMI category, and outputs the BMI value tothe user's program W (kg) h2 (m2) BMI Display Normal if 18.5 s BMI 25 Display Overweight if 25 s BMI <30 Display Obese if BMI 2 30 Else display underweight So you will create two...

  • Please answer 1c, use MATLAB, and paste your entire script in your answer so that I...

    Please answer 1c, use MATLAB, and paste your entire script in your answer so that I can copy and paste to see if it works. Problem #1 400g triangle square pentagon hexagon Figure 1 For a closed geometric figure composed of straight lines (Figure 1), the interior angles in the figure must add to (n-2)(180) where n is the number of sides. Required Tasks a) Write a script that prompts the user to select from one of the following shapes:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT