1)% for quiz grades.
clear all;
clc
prompt = 'enter n value ';
n = input(prompt);
quiz_grades = randi([0,100],1,n) %random value of
number b/w 0 -100
minimum =
min(quiz_grades); %
finding minimum of values
average =
mean(quiz_grades(quiz_grades~=minimum))
%finding mean value leaving minimum value
maximum =
max(quiz_grades)
%finding maximum value
%2) to find left right division
A = [8,-11,7,5,-1,2,3,4;
3,-8,4,-9,2,9,1,-1;
0,3,-6,0,-13,-2,0,-5;
0,0,0,0,1,14,1,1;
19,-6,0,0,-1,0,3,0;
-12,-5,-3,17,-5,0,0,7;
0,0,23,-15,7,0,14,1;
2,-3,0,0,-4,0,5,0]
B = [115; 20;-38;-20; 75; 44; 108; 40]
left= A\B
linv =
inv(A)*B
%left inverse
lraised = A^-1 *B %raised to power
-1
right = B/A
rinv = A*inv(B)
rraised = A *B^-1
%3) to find the summation of infinite series
clear all;
clc
prompt = 'enter n value ';
n = input(prompt);
L =log(2)
for i=1:n
P =(1/((2*n+1)*(2*n+2)));
end
S= sum(P)
per_err = ((L - S)/L)*100
Write a script that prompts the user to enter a value n (n > 6) that...
MATLAB QUESTION!!! 9) The following system of equations is used in Navier Stokes theorem to determine force fluctuations on a hypersonic jet. Solve the following system of equations using inverse matrix method and left division. Show how long this process takes to compute using Matlab. 3x+y+z+w+3v=27 5v-3y+x+7z+w=17 2x+2y-3z+4w-v=16 x+y+z+w+y=1 y-z+x-w-7v=-7
1.1) Write a script in MATLAB that uses Reimann sum with 100 intervals (n=100) to calculate hydrostatic force of water on a triangular gate submerged under water (Figure 1). Give two estimates of this force (lower and upper bound for value of force). Hint: You may need to first find the hydrostatic force on the thin hashed slice by hand using the following information. Hydrostatic pressure P = pgz. p = 10003,= 9.81 m2/s. Note that h = 7-z and...