"faizal " <firstname.lastname@example.org> wrote in message <email@example.com>... > > fcnstr='x^2 - 3*x^3 + 0.5*x^4' ; > > %Converting the input function to that can be used > f=inline(fcnstr) ; > > "??? Error using ==> inline.subsref at 17 > Too many inputs to inline function. > Error in ==> Untitled18 at 47 > ka=f(xr(i),yr(i));" > Mind to explain to me what the probelm here...i'm a newbie using Matlab
Look at fcnstr. Notice that it only has x's as variables, so when you create the inline function, there is only one variable, so only 1 argument.
Somewhere after you make the function f, type "keyboard" and run your code. You will be stopped at this line. Then, in your command window, type "f", and you'll see what it looks like: