Hi, I encountered a problem doing integration using simpson 3/8 or 1/3 or trapezoid rule on 2 sets of vectors x and y. It turns out that the error occur in my function file. For integration, i need to check the spacing of vector x to be the same first.
let me put it like this example:
error('x spacing not correct')
Although each spacing of x should be the same, which is p=1e-3. However, the for loop gives error. (error: x spacing ot correct) . It doesnt give error if p = 1.
Is this because of the limitation of Matlab? Sorry if this is a pretty basic theory i should know.
Thanks for your help.