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

  Create a matlab program

Create a MATLAB program that will use MATLAB's fzero function to determine d for the following parameters: R = 0.5 m and in steps of 0.1. Create a table consisting of S and d .

  Mobile robot control and potential field

Write a MATLAB code to compute forces due to each obstacle and goal. Compute total force on vehicle at point(x,y).

  Write a script to solve the following systems of equations

Write a script to solve the following systems of equations using both matrix left division (\) and the inverse matrix method and Show that you have tested your MATLAB code appropriately

  Cell array named carray that will hold numbers and text

In MATLAB, write a program to create a cell array named CArray that will hold numbers and text. Create a loop that first asks for an 'n' to be entered for a number or an 's' to be entered for a text string. If neither an n nor an s is entered, end..

  Create an output array using input x values 1 through 10

The function is y=(x)/(sqrt(x)), create an output array using input x values 1 through 10. I can't seem to get this to work for some reason...

  Program that prompts the user to enter grades in a loop

Write a main program that prompts the user to enter grades in a loop, ending on a negative number, stores the grades in a vector, and asks the user for a passing grade. Ten pass the grade vector and passing cutoff to the function and print the per..

  Explore the design of a recursive digital filter

In this simulation we are going to explore the design of a recursive digital filter which might be usedvin a digital radio station. The sampling frequency used in digital radio (DAB) is either 48 kHz or 24 kHz and for the purposes of this simulation,

  Consider a cstr with a feed stream

Consider a CSTR with a feed stream containing only A at a concentration of cA and the reactions A?B?C taking place in the CSTR. Both reactions are first order in the reactant

  Determine the volume of the pyramid

Determine the volume of the pyramid. When the user enters every value, they will then be prompted also for either 'i' for inches, or 'c' for centimeters.

  Mat lab programming problem

In case the problem in the code I want you to modify it give the correct temperature.

  Division by zero is not possible

You must also ensure that division by zero is not possible. If the user tries to divide by zero, the calculation should not be attempted, and an error message should appear in the Result text box.

  One-dimensional steady-state heat flow

A one-dimensional steady-state heat flow, the mathematical formulation of problem - find out the temperature differences at each locations and calculate the temperatures at each locations

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