Question: Programming Language: MATLAB 3. Using a while loop to increment i, determine and display the number of positive integers for which i^2.5 is less than

Programming Language: MATLAB

3. Using a while loop to increment i, determine and display the number of positive integers for which i^2.5 is less than 1,000,000.

Programming Language: MATLAB 3. Using a while loop to increment i, determine

1. Create a 4x4 matrix containing random integer values between 3 and 12. Display matrix and the sum of al its elements. Replace the values of the 2x2 matrix in the center of the 4x4 with zeros. Display the modified 4x4 matrix. 2. Approximate the value of by considering a quarter unit circle enclose inside a square. The shaded quarter circle area is r2/4 = 12/4 = /4. The area of the circle can be approximated by choosing a large number of random points inside the square and counting the percentage that fall inside the quarter circle. The equation of a circle with unit radius centered at the origin is This is rearranged to give so any (x.y) point inside the square is also is inside the black area if The area inside the square is one square unit and so the ratio of points inside the black area represents the area of the black area. Inside a loop, choose a random position inside the square. Increment a counter if the point falls inside the quarter circle. Dividing the counter by the total points used gives the ratio of the black area to 1 square unit of area. Knowing computed black area to equal-4 allows solving for T. Execute the loop a sufficient number of times to obtain an accurate approximate of pi to 3 significant figures. 3. Using a while loop to increment i, determine and display the number of positive integers for which i25 is less than 1,000,000 1. Create a 4x4 matrix containing random integer values between 3 and 12. Display matrix and the sum of al its elements. Replace the values of the 2x2 matrix in the center of the 4x4 with zeros. Display the modified 4x4 matrix. 2. Approximate the value of by considering a quarter unit circle enclose inside a square. The shaded quarter circle area is r2/4 = 12/4 = /4. The area of the circle can be approximated by choosing a large number of random points inside the square and counting the percentage that fall inside the quarter circle. The equation of a circle with unit radius centered at the origin is This is rearranged to give so any (x.y) point inside the square is also is inside the black area if The area inside the square is one square unit and so the ratio of points inside the black area represents the area of the black area. Inside a loop, choose a random position inside the square. Increment a counter if the point falls inside the quarter circle. Dividing the counter by the total points used gives the ratio of the black area to 1 square unit of area. Knowing computed black area to equal-4 allows solving for T. Execute the loop a sufficient number of times to obtain an accurate approximate of pi to 3 significant figures. 3. Using a while loop to increment i, determine and display the number of positive integers for which i25 is less than 1,000,000

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!