hi guys
Please if anyone can help me with my code. i face an error that says
**Error using ==> inline.subsref at 14Not enough inputs to inline function.x1=-4; x2=5;F=inline('4*(sqrt(x1^2 + (10-x2)^2 )-10)^2 + 0.5*(sqrt(x1^2 + (10+x2)^2 )-10)^2 -5*(x1+x2)','x1','x2'); for j=1:200 s1=-dF1; s2=-dF2;% dF1,dF2 can be found
x3=x1+s1*h; x4=x2+s2*h;%the problem is i want to use inline function as function of (h).
g=4*(sqrt(x1^3 + (10-x4)^2 )-10)^2 + 0.5*(sqrt(x3^2 + (10+x4)^2 )-10)^2 -5*(x3+x4).f=inline('g','h');
% later in my loop i will use f(a) where a is known but i always got
*** Error using ==> inline.subsref at 14Not enough inputs to inline function.
What I need is f as function in h so i can work with.
Best Answer