Problem 6/MatlabGrader Develop a Matlab function myGaussQuad that calculates the integral of a function f from a to b. As input the function shall take the anonymous function f, the integration bounds a and b and the number of Gauss points to be used m. Your function must cover 2, 3, 4, and 5 point Gaussian quadrature. As output the function shall give the calculated integral I. Do not use the table given in the book for the location of the Gauss points or the weights, but instead use the table with exact values given in the lecture notes. If the function is called with an m value other than 2, 3, 4, or, 5, the function shall execute Matlab's function error ("...") with an appropriate error message. Use your function myGaussQuad to solve problem 5, using 2, 3, 4, and 5-point Gaussian quadrature. Required submission: ☐ well commented function source code submitted to Matlab Grader printout of I for all 4 methods printout of script used to solve this problem in the Gradescope submission 69 Number of points, n Points, xj Weights, C 1 2 0 ±√√ L-100 2 1 3 0 H 5 |03/20 59 18+130 36 1+ 18-30 36 128 0 225 10 322+13√70 900 13 5-2, ±√5+2√ 10 322-13/70 900

Elements Of Electromagnetics
7th Edition
ISBN:9780190698614
Author:Sadiku, Matthew N. O.
Publisher:Sadiku, Matthew N. O.
ChapterMA: Math Assessment
Section: Chapter Questions
Problem 1.1MA
icon
Related questions
Question

I added the table needed to solve the problem.

Problem 6/MatlabGrader
Develop a Matlab function myGaussQuad that calculates the integral of a function f from a to b. As input the function shall
take the anonymous function f, the integration bounds a and b and the number of Gauss points to be used m. Your function must
cover 2, 3, 4, and 5 point Gaussian quadrature. As output the function shall give the calculated integral I. Do not use the table
given in the book for the location of the Gauss points or the weights, but instead use the table with exact values given in
the lecture notes. If the function is called with an m value other than 2, 3, 4, or, 5, the function shall execute Matlab's function
error ("...") with an appropriate error message.
Use your function myGaussQuad to solve problem 5, using 2, 3, 4, and 5-point Gaussian quadrature.
Required submission:
☐ well commented function source code submitted to Matlab Grader
printout of I for all 4 methods
printout of script used to solve this problem in the Gradescope submission
Transcribed Image Text:Problem 6/MatlabGrader Develop a Matlab function myGaussQuad that calculates the integral of a function f from a to b. As input the function shall take the anonymous function f, the integration bounds a and b and the number of Gauss points to be used m. Your function must cover 2, 3, 4, and 5 point Gaussian quadrature. As output the function shall give the calculated integral I. Do not use the table given in the book for the location of the Gauss points or the weights, but instead use the table with exact values given in the lecture notes. If the function is called with an m value other than 2, 3, 4, or, 5, the function shall execute Matlab's function error ("...") with an appropriate error message. Use your function myGaussQuad to solve problem 5, using 2, 3, 4, and 5-point Gaussian quadrature. Required submission: ☐ well commented function source code submitted to Matlab Grader printout of I for all 4 methods printout of script used to solve this problem in the Gradescope submission
69
Number of points, n
Points, xj
Weights, C
1
2
0
±√√
L-100
2
1
3
0
H
5
|03/20
59
18+130
36
1+
18-30
36
128
0
225
10
322+13√70
900
13
5-2,
±√5+2√
10 322-13/70
900
Transcribed Image Text:69 Number of points, n Points, xj Weights, C 1 2 0 ±√√ L-100 2 1 3 0 H 5 |03/20 59 18+130 36 1+ 18-30 36 128 0 225 10 322+13√70 900 13 5-2, ±√5+2√ 10 322-13/70 900
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Elements Of Electromagnetics
Elements Of Electromagnetics
Mechanical Engineering
ISBN:
9780190698614
Author:
Sadiku, Matthew N. O.
Publisher:
Oxford University Press
Mechanics of Materials (10th Edition)
Mechanics of Materials (10th Edition)
Mechanical Engineering
ISBN:
9780134319650
Author:
Russell C. Hibbeler
Publisher:
PEARSON
Thermodynamics: An Engineering Approach
Thermodynamics: An Engineering Approach
Mechanical Engineering
ISBN:
9781259822674
Author:
Yunus A. Cengel Dr., Michael A. Boles
Publisher:
McGraw-Hill Education
Control Systems Engineering
Control Systems Engineering
Mechanical Engineering
ISBN:
9781118170519
Author:
Norman S. Nise
Publisher:
WILEY
Mechanics of Materials (MindTap Course List)
Mechanics of Materials (MindTap Course List)
Mechanical Engineering
ISBN:
9781337093347
Author:
Barry J. Goodno, James M. Gere
Publisher:
Cengage Learning
Engineering Mechanics: Statics
Engineering Mechanics: Statics
Mechanical Engineering
ISBN:
9781118807330
Author:
James L. Meriam, L. G. Kraige, J. N. Bolton
Publisher:
WILEY