The limits of integration in Matlab must be double or single scalars. This means that you can't use vectors or matrices as inputs for the limits of integration.
Here's an example of how to use double or single scalars as limits of integration:
main.m137 chars7 lines
In the code above, we define a symbolic variable x
, and then we calculate the definite integral of x^2
from 0 to 1. We then repeat this integral, but this time we use variables a
and b
as the limits of integration instead of directly inputting the double scalars.
gistlibby LogSnag