Question: 1 . Develop a MATLAB function that implements the composite Simpson's ( 1 / 3 ) rule for equispaced data. 2 . Make
Develop a MATLAB function that implements the composite Simpson's rule for equispaced data.
Make sure the code prints an error and stops the code if the data is not equispaced or if the input vectors holding the data are not of equal length. Test that your error message works appropriately.
If there are only data points provided in the vectors, have the code implement the trapezoidal rule.
If there are an even number of data points ie an odd number of segments use simpson's rule for the final segments.
Use the data above to test your function. To check that you've correctly done Part evaluate the data from seconds instead of seconds.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
