Question: *** Please answer the following question using MATLAB*** This was the original question, The directions said to use a while loop to solve this problem.
*** Please answer the following question using MATLAB***
This was the original question,

The directions said to use a while loop to solve this problem. The coding on the answer key for this was:
Using this code, we are supposed to reformat this coding to be run in a for loop to create the following plot:
Please help I've been stuck on this problem forever!!!
valueon sine function . 9.16 The can be approximated with the Gregory Leibniz series summation --|--+--+-- 4 or clc clear close all diff 1; term(1) -4; while diff 0.001 term ( k+1) = term ( k) + 4*(-1)"k/ ( 2 * k+1); diff-abs (term(k+1) - term(k)); k=k+1; end term(end) ans 3.1421 Problem 9.16: Use a for loop to plot the difference for 200 terms only Locate how many terms it takes to get a difference of 0.05. Font is Times, line width is 2 and Size is 16. Recreate the following plot: Convergence for Approximation 1.25 Cutoff for Diff>0.05, N = 40 0.75 0.5 0.25 -0.25 0.5 0.75 -1 1.25 1.5 0 25 75 Number of Terms 50 100 125 150175 200
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
