In your example, why not using a simpler URQ function definition into fsolve?
For example:
mg = 0.1; h=0.1; l=0.1; L0=0.1;
function y=URQ(q)
e = mg./(2*q);
z= asinh(mg.*h./(2*q.*l.*sinh(e)))+e;
y= mg.*L0./(q.*l)-sinh(2*e-z)-sinh(z)
endfunction
q=1;
y=URQ(q)
Rgds
Rafael
-----Original Message-----
From: users <[email protected]> On Behalf Of Izabela Wójcik-Grzaba
Sent: Wednesday, April 10, 2019 3:01 PM
To: Users mailing list for Scilab <[email protected]>
Subject: Re: [Scilab-users] Nested function definition
Thank you. Is there a way to use this formulation as an input function to
fsolve? I don't know how to do it.
In my another example I also had a nested function but I managed to define it
in a form like in help page about function. It means that everything was inside
one function. This formulation worked fine in fsolve, but with my current
example I am not able to use it.
Iza
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users