Highlights
Objectives: Evaluate numerical integrals of functions using a combination of Simpson’s Rules and Trapezoidal Rule using the MATLAB program.
Task
Write a MATLAB function that will integrate discrete data, using Simpson's rules (1/3rd and 3/8th) where possible and trapezoidal rule elsewhere.
The following function header MUST be used with LastName and StudentID being replaced with your last name and student number (sxxxxxxx). The m-file must be saved with the same name as the function name for the function to work.
function int_y_dx = LastName_StudentID_composite_integration(x,y)
You MUST use the following variables for your function input arguments: x and y, where y represents a vector of values dependent on the corresponding values in vector x. The user of the function will input two vectors into your compsite_integration function. Please see the test script for an example of the input arguments for your function.
You MUST use the variable int_y_dx for your function output. This will represent the numerical integration of the area covered by x and y.
Coding Requirements
1. You may utilise the MATLAB trapz() function as part of your program. But for Simpson’s 1/3rd and 3/8th rules you should use the basic equation given on page 6. (for example, You must NOT use the integral() function).
2. You should not make any sub-functions inside your function.
3. If the x and y data given to the function is not the same length, the function MUST use the error() function to give the user an error message and exit.
4. There must NOT be any user interaction within the function (i.e. no use of input() )
5. Your code MUST return the SIGNED area under the graph (i.e., the ACTUAL value of the integral of y with respect to x, NOT absolute area). NOTE: The signed area above x-axis (bounded by the x-axis and a curve) is positive, whereas the signed area below x-axis bounded by a curve is negative. Conversely, an unsigned area is the absolute value of the integral, meaning that the unsigned area below the x-axis bounded by a curve is positive.
6. To attain maximum accuracy, your function must avoid using trapezoidal rule wherever possible. For example, if there is a run of 4 equally spaced INTERVALS, then you should use 2× Simpson 1/3rd rules rather than 1× Simpson 3/8th and 1x trapezoidal. To help you, the following table indicates which rule must be used for a given number of consecutive equal intervals (as opposed to points).
This AERO2463: Engineering Assessment has been solved by our Engineering Assessment Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.