Question

Description:   Select a math-intensive algorithm to implement using an established MPE. Possible choices include Matlab (preferred),...

Description:   Select a math-intensive algorithm to implement using an established MPE. Possible choices include Matlab (preferred), the algorithms should be implemented using numerical computation, not symbolic computation. You need to generate one or more annotated plots that illustrate the output, accuracy, or efficiency of your algorithm.

Deliverables:

  • MPE source code (w/comments)
  • Data input and output files (if applicable)
  • Annotated plots
  • A 1-2 page description of the algorithm and the output. Include the references you used for the algorithm.
  • Strongly urge you to submit final version as an HTML publication

Approximate the value of Pi using some established, iterative process. The accuracy of the Pi value should improve as the number of iterations (n) increase. Your plot should show the improvement in Pi accuracy as a function of n. One example: numerically approximate π as points are randomly scattered inside the unit square, some fall within the unit circle. The fraction of points inside the circle approaches π/4 as points are added.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

clc
clear all
close all
Nterms=10000;
piVec(1)=4;
for i=2:Nterms
piVec(i)=piVec(i-1)+4*(-1)^(i-1)/(2*i-1);
end
err=abs(pi-piVec);
semilogy(err);
title('Plot of error');
xlabel('Number of terms');
ylabel('Log of Absolute error');
disp('Final approximation of pi is');
disp(piVec(length(piVec)));

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Description:   Select a math-intensive algorithm to implement using an established MPE. Possible choices include Matlab (preferred),...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT