Please use MATLAB to answer the following. Also, please provide coding and pictu
ID: 3119640 • Letter: P
Question
Please use MATLAB to answer the following. Also, please provide coding and pictures - thank you!!
iPad Ab-Soul Th 2 of 3 1:23 AM uga view. usg.edu Music I Boom... How To Play... YouTube Search everyt... Cannot Open... Math2250 Jo... Halloween V... 21 n l. Sterling's approximation for large factorials is given by Use the equation to calculate 50!. Compare the results of the value obtained with the MATLAB function factorial by calculating the difference (d between the two methods: difference d F 2. Input the matrix Q in MATLAB. 3 4 81 112 8 4 3 4 2 5 8 4 6 D3 4 8l i. Write the MATLAB command that you will use to create A from Q. Your command should not be picking the individual elements ofQ. hint: your command should have only two row vectors J A ii. Write a MATLAB command that will delete some of the elements in Q to create the new matrix Q as shown 12 3 4 2 4 6 3. What single MATLAB command will you use to create the following matrix. You cannot type in the individual elements. 3 4 31 3 4 3 19% Direct FileT...Explanation / Answer
code
n= 50;
stirling_formula = sqrt(2*pi*n)*(n/exp(1))^n
% using stirling's method
fact_func = factorial (n)
% using built-in function
difference = fact_func-stirling_formula
% difference = fact_func - stirling_formula
%for finding error use difference = (fact_func - stirling_formula)/fact_func
result
stirling_formula =
3.0363e+064
fact_func =
3.0414e+064
difference =
5.0647e+061