Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

1/4 can be approximated by the following series: /4 = 1-1/3+1/5-1/7 + 1/9 - ... Write a MATLAB code that computes x/4 using the above

image text in transcribed

1/4 can be approximated by the following series: /4 = 1-1/3+1/5-1/7 + 1/9 - ... Write a MATLAB code that computes x/4 using the above series. The answer should be accurate to 3 significant figures. Use 0.785398163397448 as your true value, For each iteration, your code should display a list of values of the following variables in the form of a table (i.e. the following should be the columns of the table): Iteration, (use variable iter) Approximation, (use variable sol) PERCENT true relative error (use variable et) PERCENT approximate relative error (use variable ea) Note: You should use only one loop. . Your loop should not exceed 100 iterations regardless of convergence. Use maxit = 100. - Display your table to check that your maximum iteration is, in fact, not more than 100 USE ea (NOT et) and MAXIMUM ITERATION LIMIT AS CONDITIONS FOR YOUR WHILE LOOP. Script C Reset MATLAB Documentation i % approximate pi/4 using 1 - 1/3 + 1/5 - 1/7 + 1/9 - +

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions