Create a function called freefall

Assignment Help MATLAB Programming
Reference no: EM13511445

Problem 1 The distance a freely falling object travels is

x = 1/2 gt2

where

g = acceleration due to gravity, 9.8 m/s2

t = time in seconds

x = distance traveled in meters.

If you have taken calculus, you know that we can find the velocity of the object by taking the derivative of the preceding equation. That is,

dx/dt = v = gt

We can find the acceleration by taking the derivative again:

dv/dt = a = g

a. Create a function called freefall with a single input vector t that returns values for distance x, velocity v, and acceleration g.

b. Write a script that tests your function with a time vector that ranges from 0 to 20 seconds.

Problem 2: Consider the following method to approximate the mathematical constant, e. Start by generating K uniform random integers between 1 and K. Compute J, the number of integers between 1 and K which were never generated. We then approximate e by the ratio

K/J

Consider the following example for K = 5. Assume that the following five integers are randomly generated between 1 and 5.

11232

The number of times the integers are generated is given by

698_Find the acceleration by taking the derivative.png

Write a function called eapprox that takes the value of K as input and which them approximates e using the method described above. Test your function several times with different values of K and compare the result to the value of e using the built-in MATLAB function.

Reference no: EM13511445

Questions Cloud

The volumes were used to titrate a 50ml aliquot of a sample : The volumes(45.01,45.05,45.07, and 45.33)ml were used to titrate a 50ml aliquot of a sample. would you reject any values at a 90% confidence interval. how about a 95% confidence interval
Compute the change in momentum of the ball : a 0.060 kg tennis ball, initially moving at a speed of 10 m/s, What is the change in momentum of the ball in kg m/s
What is the net realizable value of sorter company accounts : What is the net realizable value of Sorter Company's accounts receivable before the write-off of the Ordonez receivable?
At what time the collection of the account is recorded : Supplement Under the gross method of recording sales discounts discussed in this chapter, is the amount of sales discount taken recorded.
Create a function called freefall : Write a function called eapprox that takes the value of K as input and which them approximates e using the method described.
Find the magnitude of the small objects momentum change : A small object with a momentum magnitude 6.0 kg m/s approaches head on a target at rest. What is the magnitude of the small objects momentum change
Find out the osmotic pressure of a solution : Determine the osmotic pressure of a solution that is 0.200 M in glucose and 0.100 M in sodium chloride at 37.0 degrees celsius. Assume no ion pairing.
Estimate the angular speed of the turntable : A large turntable rotates about a fixed vertical axis, making one revolution in 5.00 s. What is the angular speed of the turntable when the child is 2.50 from the center, assuming that you can treat the child as a particle
What question exists with respect to the valuation : Also on August 17, the customer returned goods costing $1,000 (with a sales price of $1,500). The customer reported that the goods did not meet the required specifications.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd