Problem #5: The following is a piece of MATLAB code given in your book. Study th
ID: 1766346 • Letter: P
Question
Problem #5: The following is a piece of MATLAB code given in your book. Study the code and answer the questions asked below function [fx, ea , iter) = lterMeth (x,es,maxit) % Maclaurin series of exponential function % [fx,ea, iter] = 1terMeth (x,es,maxit) % input: % x value at which series evaluated % es = stopping criterion (default = 0.0001) % maxit = maximum iterations (default = 50) % output: % fx = estimated value % ea = approximate relative error (%) % iter = number of iterations % defaults: if narginExplanation / Answer
Ans 1- IterMeth
Ans 2-x,es,maxit
Ans 3-ea,fx,iter
Ans 4-It shows the Maclaurin's series of the value given by user constrained by a certain stoppage criterion and a maximum number of iterations.
Ans 5- In line 16 the number "1" is being assigned to three variables- iter,sol,ea. It is their initialization.
Ans 6- This line is dependent on x; however "iter" will be 4.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.