1. Engineering
  2. Computer Science
  3. p2 the value of t can be determined by the...

Question: p2 the value of t can be determined by the...

Question details

P2. The value of T can be determined by the series (-1)(k+1)4 (2k-1) 4-, 4 t 4-4-4-4-4 3 5 7 9 13 y Write a MATLAB function [n,pival,err]-findPivalue (targetError) that determines the minimum number of terms of the series n required to achieve an absolute value of the percentage relative error (err) that is less than or equal to targetError. Here piVal is value of T determined by summing the first n terms of the series. Submit a printout of the function. For example: If targetError-20, then the function should return values of n-2, piVal-2.666667 and err-15.127364 because the first two terms will give a value of 41 l-2-2.666667 which has an absolute percentage relative error of ( π 2.666667 100 15.12% that is less than or equal to the target error of 20%. If targe tError-3, then the function should return values of n=11, pival-3.232316 and err 2.887808 because the first eleven terms will give a value of 3.232316 which has an absolute percentage relative error of . KT-3.232316, 100-2.89% that is less than or equal to the target error of 3%.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution