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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!