A and B must be floating-point scalars.
Show older comments
Hi,
Simple que: I have used below and it gave me the error in the question title.
xx=linspace(0,1,101);
Ah4 = ones(1,101);
integral(@(xx) -4*Ah4, 0, xx)
I need to integrate
int_0^x -4 dx
my x should be
xx is x actually and needs to be (0:0.01:1)
1 Comment
Geoff Hayes
on 7 Apr 2015
Meva - your third input to the integral function is xx which is an array of 101 elements and so is not the scalar that is required by this function. If zero is your minimum bound then should one be your maximum? What is the function that you are trying to integrate. Please describe the function and the interval over which you are integrating.
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differentiation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!