Hi,
I want to create the jacbobian from a function and therefore using Adigator. My function contains fsolve which causes some problems. I tried a simple example but it is not working. Example Para = adigatorCreateDerivInput([2, 1],'Para');
genout = adigatorGenJacFile('loeser',{Para});
The function loeser looks like:
ADiGator requires that all functions be in the overloaded library. The
function fsolve in MATLAB is not overloaded by ADiGator, nor could it be
because ADiGator differentiates user source code. You are asking to take
the derivative of a function (loeser) which depends upon a function that is
neither in the ADiGator overloaded library not could be written to be in
the overloaded library due to the nature of fsolve itself.
Anil
On Wed, Jun 15, 2016 at 8:38 AM, Christoph Alert <christoph2222@users.sf.net
wrote:
Hi,
I want to create the jacbobian from a function and therefore using
Adigator. My function contains fsolve which causes some problems. I tried a
simple example but it is not working. Example
Para = adigatorCreateDerivInput([2, 1],'Para'); genout =
adigatorGenJacFile('loeser',{Para});
The function loeser looks like:
function Res =loeser(Parameter)X0= [-1;1];Par = Parameter;fun = @(x_it)[x_it(1)+Par(1),Par(2)*x_it(1)+x_it(2)^2];Res = fsolve(fun,X0);end
Then I recieve the error:
Error using fsolve (line 160)
FSOLVE requires the following inputs to be of data type double: 'X0'.
Error in adigatortempfunc1 (line 11)
Res = fsolve(fun,X0);
Error in adigator (line 505)
FunctionInfo = adigatortempfunc1(FunctionInfo,UserFunInputs);
Error in adigatorGenJacFile (line 128) [adiout,FunctionInfo] =
adigator(UserFunName,UserFunInputs,AdiJacFileName,opts);
Error in main_9 (line 14)
genout = adigatorGenJacFile('loeser',{Para});
adigatortempfunc1 calls again fsolve but changes the type of X0. Any idea
to solve this?
Hi,
I want to create the jacbobian from a function and therefore using Adigator. My function contains fsolve which causes some problems. I tried a simple example but it is not working. Example
Para = adigatorCreateDerivInput([2, 1],'Para'); genout = adigatorGenJacFile('loeser',{Para});
The function loeser looks like:
Then I recieve the error:
Error using fsolve (line 160)
FSOLVE requires the following inputs to be of data type double: 'X0'.
Error in adigatortempfunc1 (line 11)
Res = fsolve(fun,X0);
Error in adigator (line 505)
FunctionInfo = adigatortempfunc1(FunctionInfo,UserFunInputs);
Error in adigatorGenJacFile (line 128)
[adiout,FunctionInfo] =
adigator(UserFunName,UserFunInputs,AdiJacFileName,opts);
Error in main_9 (line 14)
genout = adigatorGenJacFile('loeser',{Para});
adigatortempfunc1 calls again fsolve but changes the type of X0. Any idea to solve this?
Thanks Christoph
Christoph
ADiGator requires that all functions be in the overloaded library. The
function fsolve in MATLAB is not overloaded by ADiGator, nor could it be
because ADiGator differentiates user source code. You are asking to take
the derivative of a function (loeser) which depends upon a function that is
neither in the ADiGator overloaded library not could be written to be in
the overloaded library due to the nature of fsolve itself.
Anil
On Wed, Jun 15, 2016 at 8:38 AM, Christoph Alert <christoph2222@users.sf.net
--
Anil V. Rao, PhD
Tel: (352) 672-1529
E-mail: anilvrao@gmail.com
Website: http://www.anilvrao.com
Thank you Anil for your reply.