Question: Write a MATLAB script (M-File) to calculate pi number using MATLAB random number generator rand(). Consider the circle and the square in the below figure.
Write a MATLAB script (M-File) to calculate pi number using MATLAB random number generator rand(). Consider the circle and the square in the below figure. If N random points (with random X and Y) are generated inside the square, M random points will be inside the circle. The pi number can be estimated as: pi = 4 times M/N = 4 times AreaCircle/AreaSquare pi = 4 times AreaCircle/AreaSquare In your report, you should include the following: Problem statement: briefly explain the problem to be solved - Solution method: explain your solution method by writing mathematical equations (if required), physical relations (If required)... Flowchart Pseudocode MATLAB code Result Conclusion. Note You should email your MATLAB-file before 2.00PM Thursday 2/18
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
