Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please do all parts in MATLAB. do each part in a seperate block. Put function in a seperate file and comment on what each part
Please do all parts in MATLAB. do each part in a seperate block.
Put function in a seperate file and comment on what each part of the code does please and thank you I appreciate your help!
Part 1
-Write code that produces the plot below as closely as possible. Close counts. Hint: think 1 - exponential and some sort of trig function.-For part 2-4, create a function that can perform a numerical integration over an interval given a function handle and a number of sub-intervals to use. It must have an input that specifiles the integration method as 'Trapezoid', 'MidPoint', or 'Simpson'. The function must generate a plot that clearly shows the sub-intervals being used e.i. showing the trapazoids, rectangles or polynomials.
Part 2
-Demostrate use of the function to calculate the integral of exp(x) from 0 to 3 using 20 intervals using the midpoint method.
Part 3:
-Demostrate use of the function to calcualte the integral of exp(x) from 0 to 3 using 20 intervals using the trapezoid method.
Part 4:
-Demostrate use of the function to calculate the integral of exp(x) from 0 to 3 using 20 intervals using the Simpson's rule method.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started