Write a matlab script called estimate_e

Assignment Help MATLAB Programming
Reference no: EM13690923

Problem: The number e can be estimated as an infinite series:

e = 1 +( 1/1) +(1/1?2)+(1/1?2?3)......

Write a MATLAB script called estimate_e where a while loop is used to obtain an estimate of e. Use appropriate logic to terminate the while loop when the relative change between estimates (tol) is less than 1×10-6.

Then, make a plot of the residual between your estimate and the more accurate value from Matlab's built-in function (which can be obtained by calling exp(1)) versus the iteration number. Use the function semilogy to plot your results. Repeat for tol = 1×10-9

Question: How does your actual accuracy compare to the relative tolerance you chose?

Can you provide the answer as soon as possible and use basic MATLAB concepts to make this program?

Reference no: EM13690923

Questions Cloud

Calculates how much a little league baseball team spent : Prepare a program that calculates how much a little league baseball team spent last year to purchase new baseballs.
Categorize the efficiency in terms of the variable : Show in milliseconds the amount of time this construct would require to execute if n were 1000 - Consider the following nested loop construct
Implement function types that takes no input : Implement function types that takes no input, declares 3 variables of type char, 3 of type short, 3 of type int, and 3 of type double.
How to draw a figure of an http get packet : How to draw a figure of an HTTP GET packet that shows the position and size in bytes of the TCP, IP and Ethernet protocol headers.
Write a matlab script called estimate_e : How does your actual accuracy compare to the relative tolerance you chose - Can you provide the answer as soon as possible and use basic MATLAB concepts to make this program?
How deep can the procedure calls go before registers : How deep can the procedure calls go before registers must be saved in memory? (That is, what is the maximum number of "active" procedure calls that can be made before we need to save any registers in memory?)
Implement a program using function for a defined task : Implement a program using function for a defined task. Initial data is read from a file and added from keyboard. Program has to output resulting and initial data.
Define the sums of every even column of 2d array : Define the sums of every even column of 2D array in C language - Prepare this program in c language. Show all your work.
How to use wxpython instead of matplotlib : How to use wxpython instead of matplotlib and

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Plot the lines using the inputted vector of x values and x

Write a function named solveSystem that has three inputs: two vectors consisting of coefficients [a b c] of two line equations of the form ax + by = c and a vector of x values.

  Compute and flote 4 average temperature profiles

Generate by measdata.m an array A withsize (365,24), containing temperature measurements for an entire year [1 January,..., 31 December], 24 hours a day [00.00h,...,23.00h].

  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.

  Make a program that will graph the parabolas

Make a program that will graph the parabolas each parabola a different color and put all the parabolas in the same figure or graph

  Realistic animations include more

Realistic animations include more than just translations of shapes. They also have scaling involved. For this question, you're asked to write a function called "problem4" that accepts a single input variable and applies a scaling constant of 3. Th..

  Determine the level of absolute approximate relative error

2006ENG Numerical and Data Analysis. Convert the equation into f(T) = 0 when cp of 1.1kJ/kgK. In our MATLAB program, develop a plot of f(T) versus a range of T = 0 to 1200 K. MATLAB. On the axes, put proper labelling.

  Perform gauss-jordan elimination

Write a matlab function to perform gauss-jordan elimination with pivoting. Modify the pivoting so that it is using the row with the highest absolute value rather than the first non-zero row.

  Prepare a program in matlab

Prepare a program in Matlab to add two numbers from two arrays using try catch construct. Initialize two arrays of different size, and then prompt the user to input indexes for each of the two arrays

  Write mass balance equations for the remaining reactors

Write mass balance equations for the remaining 4 reactors. Put the known values in the 5 equations and convert each equation into a form where left hand side contains all the variables and the right hand side the constant term.

  Build a simple revolvate robot

Define the robot as Robot.  Use the appropriate functions (i.e. methods) in the Robotics Toolbox - Generate a second pose and re-plot it.

  Filtering – biomedical application

Prepare a filter that removes noise produced by electronic medical equipment.

  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

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