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 functions in file

Create Functions in File and how to code this function - Declare function inputs, and outputs

  Create a vector in matlab

Create a three dimensional diagram of function.

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

  Coding(using for and while loop)

coding(using for and while loop)

  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.

  Develop a simulation program

Develop a simulation program

  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,

  F data into matlab using only the textread function?

load the following type of data into mathlab using ONLY the textread funcion? Need to import it and plot it using boxplot.

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

  Plot with three different shading scheme (one plot per each

create two vectors X and Y of values from (-pi) to pr with a spacing of pi/10. Define the vector Z as: Z=(sin(sqrt(x^2+y^2)))/sqrt(x^2+y^2)

  The function take optional arguments, theta, alpha, beta

the function tverskySim (found in problem4/tverskySim.m) takes optional arguments, theta, alpha, beta where theta is the weight assigned to the common features between a and b, alpha is the weight for the distinctive features of a, and beta is the we..

  Fourier transform and biosignal analysis

Fourier Transform and Biosignal Analysis - series data into its frequency components for the purpose of signal analysis and processing.

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