I am trying to calculate an integral in a loop however it is just returning infinity for every value; The integral in question is finite - I have tested it in wolfram alpha.
Here is my code:
ytheory = 1:10;
s = 14;
func = @(L) s.^(-0.3) .* L.^(-0.7) .*exp(-L./s);
for(i = 1:10)
ytheory(i) = integral(func,0,i);
Is this an issue with Matlab or am I doing something wrong here?