How can I define these on matlab?
I have a math function like f(x)=(x-4)* (x-6)^3 * (x-1)^2
and I define it like this;
f= @(x) (x-4)*(x-6)^3*(x-1)^2;
And I want to define f(xlow), f(xmid), and f(xhi) but I couldn't. Also I have to define these s(low), s(mid), and s(hi) but when I tried I got error warning so I failed.
s(low) = (xlow)^2; s(mid) = (xmid)^2; s(hi) = (xhi)^2;
I tried to define them to use in a formula which is:
xqu= f(low)*(s(mid) - s(hi))+fx(mid)*(s(hi)-s(low) +f(hi)*(s(low)-s(mid))) / 2*(f(low)*(xmid-xhi)+fx(mid)*(xhi-xlow)+f(hi)*(xlow-xmid));
but again I got warning and I couldn't do that either.