Re: [Scilab-users] Nested function definition

2019-04-10 Thread Izabela Wójcik-Grząba
abity -Message d'origine- De : users De la part de Izabela Wójcik-Grzaba Envoyé : mercredi 10 avril 2019 17:31 À : Users mailing list for Scilab Objet : Re: [Scilab-users] Nested function definition Ok, sorry. It's my mistake connected with using math terms not properly. Now I underst

Re: [Scilab-users] Nested function definition

2019-04-10 Thread Perrichon
Objet : Re: [Scilab-users] Nested function definition Ok, sorry. It's my mistake connected with using math terms not properly. Now I understand that nested function is more general term in Scilab help. The help example is similar to mine and this is the whole misunderstanding. I appre

Re: [Scilab-users] Nested function definition

2019-04-10 Thread Izabela Wójcik-Grząba
Ok, sorry. It's my mistake connected with using math terms not properly. Now I understand that nested function is more general term in Scilab help. The help example is similar to mine and this is the whole misunderstanding. I appreciate your comprehensive explanation. Now I am happy because the

Re: [Scilab-users] Nested function definition

2019-04-10 Thread Samuel Gougeon
Izabela, I have not clearly understood why you are speaking about "nested functions" in your example. A nested function is a function that is /defined/ in another one. About the example in the function help page: It is right, but with Scilab 6, it looks a bit outdated to me. Indeed, let's con

Re: [Scilab-users] Nested function definition

2019-04-10 Thread Rafael Guerra
Izabela Wójcik-Grzaba Sent: Wednesday, April 10, 2019 5:04 PM To: Users mailing list for Scilab Subject: Re: [Scilab-users] Nested function definition Ok, so why nested function in help is so complicated: //nested functions definition function y=foo(x) a=sin(x) function y=sq(x), y=x^2

Re: [Scilab-users] Nested function definition

2019-04-10 Thread Izabela Wójcik-Grząba
2019 3:01 PM To: Users mailing list for Scilab 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

Re: [Scilab-users] Nested function definition

2019-04-10 Thread Rafael Guerra
-Original Message- From: users On Behalf Of Izabela Wójcik-Grzaba Sent: Wednesday, April 10, 2019 3:01 PM To: Users mailing list for Scilab 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

Re: [Scilab-users] Nested function definition

2019-04-10 Thread Izabela Wójcik-Grząba
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 formulat

Re: [Scilab-users] Nested function definition

2019-04-09 Thread Stéphane Mottelet
Hello, Le 09/04/2019 à 20:17, Rafael Guerra a écrit : globalmg h l L0; The above line is useless no ? mg= 0.1; h=0.1; l=0.1; L0=0.1; function*e*=_eta_(*q*) *e*= mg./(2**q*) endfunction function*z*=_zeta_(*q*) *z*= asinh(mg.*h./(2**q*.*l.*sinh(_eta_(*q*+_eta_(*q*); endfunction fun

Re: [Scilab-users] Nested function definition

2019-04-09 Thread Rafael Guerra
global mg h l L0; mg = 0.1; h=0.1; l=0.1; L0=0.1; function e=eta(q) e= mg./(2*q) endfunction function z=zeta(q) z= asinh(mg.*h./(2*q.*l.*sinh(eta(q+eta(q); endfunction function y=URQ(q, e, z) y= mg.*L0./(q.*l)-sinh(2*e-z)-sinh(z) endfunction q=1; y=URQ(q,eta(q),zeta(q)) Rgds, R