MATLAB Do not copy other solutions they are incorrect.
1A) Open a new script (top left button in Home menu) and type your name and student ID number as comments in the top two lines of the script, as designated below.
% First_Name Last_Name
% Student ID Number
For the remainder of this project, a= last digit of your student ID, b= second to last digit of your student ID, c= third to last digit of your student ID, and d= the sum of the last three digits of your student ID. Complete the following operations in your script, making a new line for each operation. For these exercises, use the function given below - a two-dimensional Gaussian function.
A=1, b=2, c=3, d=6
f(x)=(a+1) e^-(x-(d+5))^2 /(b+c+1)
1B) Write clear variables to begin the exercise, then proceed to the following problem. Consider y=f(x) above over the interval [d, d+10]. Use a for loop combined with a sum command to get a left-hand estimate and a right-hand estimate of the area between the function and the x-axis over the interval above. Assume that you will have 20 subrectangles for both estimates. Declare your results P1Bleft and P1Bright.
1C) Write clear variables on a line in your script after your answers for 1B, then proceed to the following problem. Use the int command to get an antiderivative of y=f(x), i.e. use MATLAB to compute the indefinite integral ∫ f(x) d x. Hint: the output should contain the Gauss error function; so, if the output looks suspicious, it is probably okay. Declare your result as P 1 C.
1D) Use the int command to evaluate the definite integral ∫_d^d+10 f(x) d x. Hint: the output should look like the previous problem. Declare your result as P1D.
1E) Use the vpa command to get a numerical approximation to the definite integral ∫_d^d+10 f(x) d x. Hint: the output should be a decimal answer close to what you found in 1B. Declare your result as P1E.
Once you have these operations written in proper MATLAB syntax, go to your Editor menu and click Run. If there are values in your Command Window for all operations without error messages, then your code has successfully run! If you have error messages, read them carefully and try to resolve them, then click Run again.