Write a matlab function called newtons method

Assignment Help MATLAB Programming
Reference no: EM131026501

Problem:

Newton's method is a simple algorithm for approximating the roots of an equation. This algorithm works by taking the derivative (slope) of a function at a point along that function, finding where that slope intersects the x-axis, and then repeating for this new point. Repeating this process gets us closer to the root of the actual function. We can describe Newton's method in general form by the equation:

xn+1 = xn - (f(xn)/f'(xn))

Write a MATLAB function called newtons Method that accepts two inputs and returns one output. The inputs should be a vector representation of a polynomial and an initial guess for the root. The output should be the root returned by Newton's Method. Your function should find the root within at least 6 decimal places of accuracy. Your function should also gracefully handle when f'(x) is zero (don't divide by zero) and the case when there isn't a root (don't loop forever).

Check your answer with the polynomial y = 3x2+2x-6 to generate output. Your script should perform this calculation in both of the following ways. (1) Call your newtons Method function twice with these two guesses: 1 and -1. (2) Use the roots() function on your polynomial. Print all solutions to 6 decimal places.

Additional information

This problem belongs to MATLAB software and discusses about application of MATLAB in mathematics to find area of a tea spill using numerical integration.

Answer is in MATLAB format

Reference no: EM131026501

Questions Cloud

Method-of-moments estimator : Find the method-of-moments estimator of p based on this single observation Y.
How do you make decisions : How Do You Make Decisions? In this course, you will read about theories regarding how people make decisions and how they should make decisions.
Method-of-moments estimator : An urn contains θ black balls and N - θ white balls. A sample of n balls is to be selected without replacement. Let Y denote the number of black balls in the sample. Show that (N/n)Y is the method-of-moments estimator of θ.
Probability density function : Suppose that a statistic U has a probability density function that is positive over the interval a ≤ u ≤ b and suppose that the density depends on a parameter θ that can range over the interval α1 ≤ θ ≤ α2.
Write a matlab function called newtons method : Write a MATLAB function called newtons Method that accepts two inputs and returns one output. The inputs should be a vector representation of a polynomial and an initial guess for the root.
How the row operations correspond to operations : The three elementary row operations come from a very natural place - they are thematrix equivalent of the same three operations allowed when reducing and solving a system of equations.
Observed number of breakdowns : The number of breakdowns Y per day for a certain machine is a Poisson random variable with mean λ. The daily cost of repairing these breakdowns is given by C = 3Y 2. If Y1, Y2, . . . , Yn denote the observed number of breakdowns for n independentl..
Determine the electron de broglie wavelength and momentum : A free electron has wave function Ψ(x, t) = sin(kx - θt) 1, Determine the electron's de Broglie wavelength, momentum, kinetic energy and speed when k = 50 nm-1 .
Estimate the area of the tea spill : The surface area of a tea spill is estimated by measuring the width (in cm) of the spill at equally spaced intervals of 1.5 cm (width data is found in TeaSpill.txt). Use numerical integration to estimate the area of the tea spill.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Simulate and compare the ber of a 16-psk system

Question is that" Simulate and compare the BER of a 16-PSK system and a 16-QAM system without Grey coding and Eb/N0=0,2,4,6,8,10 dB. "

  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.

  Coding(using for and while loop)

coding(using for and while loop)

  A volume 10 in long 5in wide and 05 in thick is to be

a volume 10 in. long 5in wide and 0.5 in. thick is to be removed by face milling cutter that is 3in. diameter and has 6

  Create an animation of a square

create an animation of a square according to the directions below. Create a square with a side length of 3 with the square centered at (5,5). Translate this square along a cosine wave on the interval [0, 6*pi].

  Compute the value of each piece of clothing

You decide to write a script in MATLAB that will compute the value of each piece of clothing.

  Write a matlab routine data matrix containing a multivariate

Write a MATLAB routine A = ChowLiu(X) where X is a D × N data matrix containing a multivariate datapoint on each column that returns a Chow-Liu maximum likelihood tree for X.

  Ilab overview

you will develop a policy statement and the processes and procedures that can be used to drive the design, implementation, and maintenance of a wireless network in a SOHO (small office, home office) setting.

  Write the numerical values of temperature

Write the numerical values of temperature and the corresponding value of the analytical solution to this problem, T=xy, at each of your grid points, to a text file.

  Matlab program to compute how much money will accumulate

Write a MATLAB program to compute how much money will accumulate in 5 years in the account and in any CDs you buy. Run the program for two different savings interest rates: 4 percent and 5 percent.

  Z-transform in matlab

Z-Transform in MATLAB, Sketch the z-plane pole-zero plot and determine the stability status for the following digital system. Determine the h(n) in MatLab.

  Problems related to matlab

solve the system for the least-squares estimates of Δρi.

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