Develop your own matlab function for the fixed-point method

Assignment Help MATLAB Programming
Reference no: EM13168573

Develop your own Matlab function for the Fixed-point method. Use the approximate relative error as your stopping criterion. The first line of your function should be function [root,froot,ea,iter] = fixedpoint(func,xr,es,maxit) where func is the function handle for the function to find the root of, xr is the initial guess for the starting point, es is the stopping criterion for the approximate relative error, and maxit is the maximum number of iterations; rootis the value of the root, froot is the function value at root, ea is the approximate error of that root, and iter is the number of iterations needed.

Test your code for f(x) = 0.2-log(x^0.2) = 0, using an initial guess of xr = 1 and a stopping criterion es=1.e-4. (The correct result is x=exp(1)= 2.718281828459046.)

 

 

Reference no: EM13168573

Questions Cloud

Write a program to create 100 real random numbers : Write a program to create 100 real random numbers and store it into a 1-D array. Find the value 1413 from the stored data and print out the value 1413 and the index of the array to the screen
What mass of co2 produced during the combustion analysis : Vitamin B12, also known as cobalamin, has the molecular formula C63H88N14PO14Co. What mass of CO2 and H20 would be produced during the combustion analysis
Every society tries to regulate the behavior of individuals : Every society tries to regulate the behavior of individuals
What is technology s-curve : What is technology S-curve? Give an example that explains how to use S-curves to prescribe development of new component technologies.
Develop your own matlab function for the fixed-point method : Develop your own Matlab function for the Fixed-point method. Use the approximate relative error as your stopping criterion. The first line of your function should be function [root,froot,ea,iter] = fixedpoint(func,xr,es,maxit)
What will be the theoretical yield of water in grams : If 3.50 g of H2S are used in the above reaction, what will be the theoretical yield of water in grams?
Is it realistic to disregard the presence of no : If the combustion gases consist of CO2, H2O, CO, O2, and N2 that exit at 1200 K and 2 atm, determine (a) the equilibrium composition of the product gases and (b) the rate of heat transfer from the combustion chamber. Is it realistic to disregard t..
You have been hired by a school district : You have been hired by a school district to write a program that will grade multiple choice exams and providea report listing the grade (numeric and letter) for each student, the problems missed for each student.
Write a program that find the average time spent programming : Write a program that finds the average time spent programming by a student each day over a 3 day period.

Reviews

Write a Review

MATLAB Programming Questions & Answers

  The body fat percentage

The body fat percentage (BFP) of a person can be estimated by the formula BFP= 1.2xBMI+0.23xAGE -10.8xGEnder-0.54 where BMI is the body mass index, given by BMI = 703 W/H^2, in which W is the weight in pounds and H is the height in inches

  Value for the side of the octagonal prism

Value for the side of the octagonal prism, and a scalar value for the height of the octagonal prism. Generate the x,y,z arrays that define the 9 faces of the pyramid (octagonal base and 8 triangles. Use fill3 command to create the faces (faces wit..

  Matlab m-script that will generate a damped sinusoid

1.) Write a MATLAB m-script that will generate a damped sinusoid (frequency = 440 Hz) with a time constant of 0.25 sec. Set the time axis for 0 to 6 time constants.

  Matlab: create a function that will use the secant method

MATLAB: Create a function that will use the Secant method

  Find general solution of the ordinary differential equation

Find a general solution of the following ordinary differential equations and find the general solution of the following ordinary differential equation

  Function that takes as input parameters

Define a function that takes as input parameters a function handle f, start and end values a and b, and a number of steps n. The function should compute and return the x and y values of the maximum of the function over the range a to b.

  Generate a sphere of diameter 3. create 3 vectors

Generate a sphere of diameter 3. Create 3 vectors representing the translation of this sphere along the x, y, and z axes. Generate the correct vectors given the description below: The sphere should be translated to (-10, -10, -10).

  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.

  Generate by means data.m an array

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].

  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].

  Create a function that will determine the total resistance

Create a function that will determine the total resistance of a number of resistors that are connected in parallel. This function should accept a row vector for input,

  Determine the inputs, outputs, relevant formulas

determine the inputs, outputs, relevant formulas

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