Extra credit assignment for an Electrical Engineering course
Write a program in Matlab(Python) that computes PI by considering a series of random numbers over the unit square and how that translates to the ratio of numbers within the unit (quarter) circle versus the entire square.
Plot your value of PI versus the number of random numbers that you use. You should compute to at least 2-4 decimal places.
There is a space on Blackboard for submitting
-
Matlab code and output.
-
Plots showing how your algorithm worked