I try to do it like this:
syms xRR = [x.^2 x.^3 x];q = quad(@(x)RR(1),0,2);disp(q)
But when I run it it gives me this error:
??? Undefined function or method 'isfinite' for input arguments of type 'sym'.Error in ==> quad at 81if ~isfinite(y(1))Error in ==> Untitled at 5q = quad(@(x)RR(1),0,2);
If I try it like this:
syms xRR = x.^2;q = quad(@(x)RR,0,2);disp(q)
It gives me the same error:
??? Undefined function or method 'isfinite' for input arguments of type 'sym'.Error in ==> quad at 81if ~isfinite(y(1))Error in ==> Untitled at 5q = quad(@(x)RR,0,2);
But if I do it like this:
syms xRR = @(x)x.^2;q = quad(RR,0,2);disp(q)
It works. So my problem is that I got a vector with functions in it on which I would like to use quad on each of the functions, one at a time. Is this possible?
Best Answer