Question: Sequence to SQRT(2) again (while loop based on convergence, scalar variables) D Sequence to SQRT(2) again (while loop based on convergence, scalar variables) D 0
Sequence to SQRT(2) again (while loop based on convergence, scalar variables) D

Sequence to SQRT(2) again (while loop based on convergence, scalar variables) D 0 solutions submitted (max: Unlimited) Consider the sequence ? 17 212 1, defined by ck-1 The sequence converges on the square root of 2 as N increases. The relative error, e, between the Nth term and sqrt(2) can be expressed as 2-N Write a function that accepts a single scalar input for the error tolerance and generates sequence terms until the relative error, e, is less than or equal to the input tolerance. The function should output two values, in order 1. The first output is a scalar variable with only the last term generated. 2. The second output is the number of terms needed to meet the tolerance #FUNC, #TYPE Your Function C Reset ATLAB Documentation function [LastTerm, NumTerns]-student solution (ErrorTol) 3 %Enter the connards for your function here. You can change the names of the input and/or output arguments in the function command above to match the variables in your code. Do not change the name 5 end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
