MATLAB CODE:
% Perform housekeeping
clear;
clc;
clf;
% Number of coins
n = 100;
% Generate random variables x, y
x = rand(1, n);
y = rand(1, n);
% Scatter plot
plot(x, y, 'o');
title('Location of Simulated Coins in Unit Square');
xlabel('x position');
ylabel('y position');
hold on;
% Inscribe a quarter circle x^2 + y^2 = 1
theta = linspace(0, pi/2);
% Draw circle using x = r*cos(theta) and y = r*sin(theta)
xx = cos(theta);% Here r = 1
yy = sin(theta);% Here r = 1
plot(xx, yy);
hold off;
% Vector of distance of each coin to the origin
r = sqrt(x.^2 + y.^2);
% Count number of coins inside the quarter circle
insideCount = length(find(r < 1));
% Ratio of the number of coins inside the quarter circle to the total
% number of coins
ratio = insideCount/n;
% Associate Pi with 4 * The Ratio of the Number of Coins inside the quarter
% circle to the total number of coins
result = pi*4*ratio;
SAMPLE PLOT:

FOR ANY HELP JUST DROP A COMMENT
need help with matLab Question 1 (20 Points) Write a well-documented MATLAB script hmwk7Q1.m that simulates...
I need help with these two Matlab question (1)Write a script that will 1. prompt the user for a maximum x value. 2. create an x vector from 1 to the user’s maximum in steps of 0.1 3. create a y vector which is sin(x) 4. plot the x and y vectors using blue *s, using appropriate x and y labels and a title (2)Write a fives function that will receive two arguments for the number of rows and columns...