I'm trying to use MATLAB's integral
function on MATLAB R2012b.
The associated function documentation has a clear example
% create an anonymous function
fun = @(x) exp(-x.^2).*log(x).^2;
% integrate
q = integral(fun,0,Inf)
But when I do this I get;
Error using subsindex
Function 'subsindex' is not defined for values of class 'function_handle'.
I've seen this appear a view times in random places online, but never found a satisfying answer describing what's going on. Any ideas of how to stop this or what could be causing it?