A and B must be floating-point scalars.
显示 更早的评论
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 个评论
Geoff Hayes
2015-4-7
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Numerical Integration and Differentiation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!