Write a matlab function newtonraphson

Assignment Help MATLAB Programming
Reference no: EM13166978

Write a MATLAB function newtonRaphson(fx, x0, sigfig, maxIT) that will return a root of the function f(x) near x=x0 using the Newton-Raphson method, where sigfig is the accuracy of the solution in terms of significant figures, and maxIT is the maximum number of iterations allowed. In addition to the root (xr), the function newtonRaphson is expected to return the number of iterations and an error code (errorCode). As such, the first line of the function m file newtonRaphson.m must read as:
function [xr, nIT, errorCode] = newtonRaphson(fx, x0, sigfig, maxIT)
Include comments and necessary checks against divergence, and divide by zero situations.
Use a subfunction to calculate the derivatives.

Reference no: EM13166978

Questions Cloud

The radix sort algorithm : Show what happens to the radix sort algorithm if the counting sort is not a stable sorting algorithm. Bring a counter example
Create a program that will round a floating point : Create a program that will round a floating point value to a specified number of decimal places as input by the user. To perform the actual calculation, write a function that takes the user's value and the number of decimal places as input paramet..
First integer of input refers to the total weight the ship : First integer of input refers to the total weight the ship can carry. Second integer refers to the number of cargo present and the rest of the integers represents the individual weight of the cargo
First integer of input refers to the total weight the ship : First integer of input refers to the total weight the ship can carry. Second integer refers to the number of cargo present and the rest of the integers represents the individual weight of the cargo
Write a matlab function newtonraphson : Write a MATLAB function newtonRaphson(fx, x0, sigfig, maxIT) that will return a root of the function f(x) near x=x0 using the Newton-Raphson method, where sigfig is the accuracy of the solution in terms of significant figures
Write a curried function to add n : Write a curried function to add N (where N is an integer) to each item of a list.
Cache access time of 20ns : Given a cache access time of 20ns, a main memory access time of 1000ns, and a cache hit ratio of 90 percent. Assuming fetches to main memory are started in parallel with look-ups in cache
Write a function that accepts an int array : The task calls for: Write a function that accepts an int array and the array's size as arguments. The function should create a copy of the array, except that the element values should be reversed in the copy. The function should return a pointer t..
Write a menu-driven c program : Write a menu-driven C program with appropriate functions that allows the user to fill an array of 50 integers with random numbers on the range 1...999, inclusive, sort it, and then find search it to determine if a given random number was generated..

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Coding(using for and while loop)

coding(using for and while loop)

  Time domain design and analysis

To design a "custom" controller to reduce the vibrations of the seat and a PID controller to reduce the vibration of the seat

  Design and fir filter in matlab

What does the pole-zero diagram tells you about the filter

  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.

  Generalize the program below to allow negative integers

Using SML: Generalize the program below to allow negative integers on the input. We assume that negative integers are preceded by the minus sign(-) rather than the tilde (~). Note that we not only have to recognize negative integers but we can no lon..

  Deterministic dimensions and rebar area

Performance function for bending of a rectangular reinforced concrete beam under moments due to dead and live loads

  Matlab program which will determine your vehicle fuel usage

Create a MATLAB program which will determine your vehicle fuel usage (MPG, miles/gallon) rating for a user defined number of trips ('for' repetition structure).

  Matlab program which will determine your vehicle fuel usage

Create a MATLAB program which will determine your vehicle fuel usage (MPG, miles/gallon) rating for a user defined number of trips ('for' repetition structure). Review the voiceover supplied for an example of the required input/output from this progr..

  Fit the exponential function to the relaxation data

Fit the exponential function to the relaxation data and report the filename as well as the A, tau and B values and run all 3 functions in sequence to analyze ALL data

  Obtain the cross products using matlab cross function

Use MATLAB cross function to obtain the above cross products. Note that the accelerations are known functions of the derivatives of the three coordinates.

  Filtering – biomedical application

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

  Determine the size for variables used in matlab program

If b=3, a=6 how many loops would the given program do? what will be the out put for z(4)? what would be size (in rows and columns) for variables z, i and b?

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