Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

ll Zain KSA LTE 1:36 PM × GE301 Ho mework_01.pdf 2 of 2 Date Assigned: 28/03/os

ID: 3726599 • Letter: L

Question

ll Zain KSA LTE 1:36 PM × GE301 Ho mework_01.pdf 2 of 2 Date Assigned: 28/03/os Due Date 05/01/201 Problem #5: The following is a piece of MATLAB code gven in your book. Study tht code and answer the questions asked below. function Itx,ea,sterl- IterMeth(x.es,maxit % Hac 1.aur in [fx, ea, iter] IterNethix,es.maxit) exponential funetion 6 alue at which serie"valuated % es. stopping criterion 4default * 0.00013 s maxit-maxiun iterations (default-0 fx # @stimated value e approximate relative error {53 if nargin«311senpty(naxit).maxit-50end ter-1: sol-li ea-100 Sterative caleulation while ) terter1a it eacees stexaxit.beeak,end 1:What is the name of this function? 2: What input arguments does this function take? Q3: List the output variables for this function Q4: What does this function do 5: What is being done in line 16 of the code? Q6: what will be the result of line 20 after whie loop has run 4 times? Page 2 of 2 open with Print

Explanation / Answer

I have answered 4 queartions generally and answered 1 extra as BONUS

What is the name of the function?
name is: "IterMath"

What input arguments does this function takes?
input arguments: "x", "es", "maxit"

List the output variables of the function.
output variables: "fx", "ea", "iter"

what does the function do?
The function calculates the exponential function using the help of Maclaurin series

BONUS:
What is done in line no 16 of the code
it initializes some simple variables including 'iter', 'sol' (or solution) and 'ea'