I have two vectors x,y of equal size (for example 5000 elements), ranging from 0 to 1 (containing scattered data, but already sorted in increasing order). I want to evaluate the numerical integral of y(x) for each interval defined by the following vector [0 0.27 0.38 0.46 0.53 0.60 0.65 0.71 0.76 0.80 0.85 0.89 0.93 0.96 1] by means of trapz. How can I obtain the vector of evaluated integrals at each interval?
MATLAB: Numerical integral at irregular intervals of scattered data
MATLABnumerical integration
Related Question
- Calculating cdf with a matrix as an argument
- Calculating PDF from CDF
- I want a connectivity matrix of size 30×27 of the form shown in the body below. Please suggest an answer.
- Generate random sequence number with condition
- Polyfit not working right
- Error between each pixel for two matrices of equal size
- Import a vector including strings and numbers
Best Answer