P2. The value of can be determined by the series (-1)() 4 -1.2.3 (2k-1) Write a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
P2. The value of can be determined by the series (-1)() 4 -1.2.3 (2k-1) 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 determined by summing the first n terms of the series. Submit a printout of the function. For example error of 4 4 4 4 4 4 3579 11 13 + = 4--+ IftargetError-20, then the function should return values of n=2, pival-2.666667 give a value of 4 I -2.666667 and err-15.127364 because the first two terms will = 2.666667 which has an absolute percentage relative |x100=15.12% that is less than or equal to the target error of 20%. IftargetError-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 -3.232316 <100-2.89% that is less than or equal to the target error of 3%. P2. The value of can be determined by the series (-1)() 4 -1.2.3 (2k-1) 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 determined by summing the first n terms of the series. Submit a printout of the function. For example error of 4 4 4 4 4 4 3579 11 13 + = 4--+ IftargetError-20, then the function should return values of n=2, pival-2.666667 give a value of 4 I -2.666667 and err-15.127364 because the first two terms will = 2.666667 which has an absolute percentage relative |x100=15.12% that is less than or equal to the target error of 20%. IftargetError-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 -3.232316 <100-2.89% that is less than or equal to the target error of 3%.
Expert Answer:
Answer rating: 100% (QA)
Heres a MATLAB function findPiValue that implements the logic you d... View the full answer
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date:
Students also viewed these programming questions
-
ccn2 java solve them all . . . r2 e1 e2 box r2 Write sound typing and subtyping rules for these constructs. [5 marks] Now suppose that we add to this calculus the type variables and bounded universal...
-
ccm1 java attend all . . . r2 e1 e2 box r2 Write sound typing and subtyping rules for these constructs. [5 marks] Now suppose that we add to this calculus the type variables and bounded universal...
-
The current quoted price of a 13% coupon bond is $110. It pays coupon semi-annually. The next coupon will be paid in 6-days (total number of days in this semi-annual period is 181) and the futures...
-
Root Trailers' job cost records yielded the following information: Use the dates in the table to identify the status of each job. Compute the following balances for Root: a. Work-in-Process Inventory...
-
Joseph and Diane Smith 1580 West Street Chatham, VA 24531 Joseph and Diane are both 35 and have no dependents. If your clients receive a refund, they want the full amount refunded to them. Diane is...
-
Elaine Chan is a newly appointed director of Elite Sports Ltd, a listed company that organises major sporting events. Elaine has provided consultancy services to Elite Sports Ltd for the past 3...
-
Parker Plastic, Inc., manufactures plastic mats to use with rolling office chairs. Its standard cost information for last year follows: Parker Plastic had the following actual results for the past...
-
12345 1 2 3 4 5 6 7 8 819 9 10 Define production system and explain types of productions system? Distinguish between product layout and process layout? Explain the principles of good plant layout?...
-
tas bww spends more on advertising, does its breakeven point go up or down illustrateg the marketing value of buffalo wild wings the customers get attracted by the advertisement process as it helps...
-
Prepare the journal entries for the following transactions: Clearly indicate what is a DR and what is a CR. When identifying the account, put in brackets an (A) for an asset, (L) for liability, and...
-
Put the following lines/sentences in an order to write an effective persuasive letter - select which order they would go on a letter. 10 points 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th We appreciate...
-
This speech is a Fact/Value speech outline Need to include introduction, body, conclusions and sources at 5. Please make sure it's a proper outline and read & follow all the instructions below....
-
Develop a case report for the Amazon.com case using case report rubric and guidelines Case report must integrate your concepts and include some of the input of your peers from the discussion...
-
Part 2: Develop an annotated bibliography on " Global warming : a threat to the world" using the following guidelines: List research materials in bibliographic form that you have found on your topic...
-
A 2.0 kg metal fragment recovered 103 m North of the scene of an explosion is found embedded in a tree 11.0 m above ground level. The metal fragment originates from an exploded propane tank and it...
-
Use nodal analysis to determine voltages v1, v2, and v3 in the circuit Fig. 3.76. Figure 3.76 4 S 3i, 2 A 4A
-
Consider a box of length L = 1 that is initially in contact with a heat reservoir on the left at T = 1 and a heat reservoir on the right with T = 0. When this system reaches equilibrium, it will have...
-
Solve Eqs. (1.2.25)(1.2.27) for the kinetic rate constants k 1 = k 1 = 2 and k 2 = 3 and the initial conditions c A (0) = 1, c B (0) = 0, and c C (0) = 0. dcA dt -KICA +K-1CB (1.2.25)
-
Consider the nonlinear differential equation subject to the conditions x = 3 and dx/dt = 2 at the time t = 1. Lets solve this problem using implicit Euler with a time step of h = 1/2. You may recall...
-
Prove that the boosted right-handed spinor \(\psi_{\mathrm{R}}(\boldsymbol{p})\) is related to the corresponding rest spinor by Eq. (14.21).
-
Use the \(\gamma\)-matrices in the Weyl representation to show that the Dirac equation (14.31) is equivalent to Eq. (14.25). Data from Eq. 14.31 Data from Eq. 14.25 (y"Pu-m)(p) = (iy" - m)(p) = 0
-
Prove the identity \((\sigma \cdot \boldsymbol{p})^{2}=\mathrm{I}^{(2)} p^{2}\), where \(\sigma=\left(\sigma_{1}, \sigma_{2}, \sigma_{3} ight)\) are the Pauli matrices, \(\boldsymbol{p}\) is the...
Study smarter with the SolutionInn App