Hi everyone I have a question to do on matlab and I am finding it difficult to answer after trying various ways.
The question is:
Develop a MATLAB user defined function that determines the definite integral
of a polynomial. The function will be of the form function G =
polyintegral(v,x0,x1) where x0 and x1 are the lower and upper limits of
integration and v is a vector of the polynomial coefficients so that the
polynomial is given by
Test your function by determining the value of
integrate with limits 3 and -2: 2+6.7x+4x^2-3x^3+1.5x-x^6dx
HINT: You can easily inegrate x^n - it is equal to x^n+1/n+1. Then evaluate ot between limits.
- Thread Starter
- 01-12-2010 18:10
- 01-12-2010 20:29
Consider what you want to come out at the end of the integration.
I would suggest writing it out by hand first before you try implementing it in MATLAB.