Write a script that will loop through values of n

Assignment Help MATLAB Programming
Reference no: EM13501590

1. Identify the problem statement
2. Define the inputs and outputs to each problem
3. Show a pseudo code design of the solution
4. Show that you have tested your MATLAB code appropriately

Problem The inverse of the mathematical constant e can be approximated as follows

1/e ≈ (1-1/n)n

Write a script that will loop through values of n until the difference between the approximation and the actual value is less than 0.0001. The script should then print the built in value of e-1 and the approximation to four decimal places, and also print the value of n for such accuracy.

Reference no: EM13501590

Questions Cloud

What are cost drivers : A few questions though could be asked to make it easier for me to understand. Some of these are: What would you consider as an individual product? What are cost drivers?
Compute at what angle will next pair of bright spots occur : A laser beam of unknown wavelength passes through a diffraction grating having 5530 after striking it perpendicularly. At what angle will the next pair of bright spots occur
How many of these nuts would a 67kg person have to eat : How many of these nuts would a 67kg person have to eat to obtain enough energy to bike (racing)for 40min?
Compute the minimum uncertainty in the speed of the electron : An electron is located on a pinpoint having a diameter of 2.5 um. What is the minimum uncertainty in the speed of the electron
Write a script that will loop through values of n : Write a script that will loop through values of n until the difference between the approximation and the actual value is less than 0.0001.
How to evaluate the molar mass of the solute : A solution that contains 55.0 g of ascorbic acid (Vitamin C) in 250. g of water freezes at -2.34°C. Calculate the molar mass (in units of g/mol) of the solute. Kf of water is 1.86°C/m.
Compute the number of moles of gas : An unknown number of moles of an ideal monoatomic gas expand reversibly from Vi = 2.30 m3 to Vf = 3.10 m3, at a constant pressure of 1.99 atm, Find the number of moles of gas
How are general long-term liabilities distinguished : How are general long-term liabilities distinguished from other long-term liabilities of the government? How does the financial reporting of general long-term liabilities differ from the financial reporting of other long-term liabilities?
Define a total vapor pressure of 93.9mmhg at the temperature : A solution of 75.0g of benzene and 75.0g of toluene has a total vapor pressure of 80.9mmHg at 303K . Another solution of 100.0g benzene and 50.0g toluene has a total vapor pressure of 93.9mmHg at this temperature.

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