# Evaluate external function for Couple ODE's

4 messages
Open this post in threaded view
|

## Evaluate external function for Couple ODE's

 This post was updated on . First of all, sorry if this is a silly question. I am getting practice in Scilab I have a set of 8 coupled ODEs and a set of 28 "external equations". One example of external equation is my volumetric flow rate: function v=F18(FE,FY,FH,FM,FP,FA,FL,FB,P,T)     v=(v0*ro0)/F17() endfunction; F17 is my density, which is depends on T, Pressure and total molar flow rate, and so on... When I solve the coupled ODEs as: X=ode(Y0,L0,L,Y), where Y are my coupled ODEs vector, I get the values  for the variables of each differential equation. My question is, how can I evaluate also the external functions? I tried 'feval', but without success Code: F5.sceThank you!
Open this post in threaded view
|

## Re: Evaluate external function for Couple ODE's

 If your L and X vectors are what I think they are, and if your external equations are what I think they are, then wouldn't each one's output depend only on the value of one column of X and the corresponding value of L? So, vectorize them and call (e.g.) F18(X, L), or F18(X(:, 42), L(42)). On Tue, 2017-05-02 at 20:21 -0700, tiagorleite wrote: > First of all, sorry if this is a silly question. I am getting > practice in > Scilab > > I have a set of 8 coupled ODEs and a set of 28 "external equations". > > One example of external equation is my volumetric flow rate: > > function v=F18(FE,FY,FH,FM,FP,FA,FL,FB,P,T) >     v=(v0*ro0)/F17() > endfunction; > > F17 is my density, which is depends on T, Pressure and total molar > flow > rate, and so on... > > When I solve the coupled ODEs as: X=ode(Y0,L0,L,Y), where Y are my > coupled > ODEs vector, I get the values  for the variables of each differential > equation. > > My question is, how can I evaluate also the external functions? > > I tried 'feval', but without success > > Thank you! > > > > -- > View this message in context: http://mailinglists.scilab.org/Evaluate> -external-function-for-Couple-ODE-s-tp4036287.html > Sent from the Scilab users - Mailing Lists Archives mailing list > archive at Nabble.com. > _______________________________________________ > users mailing list > [hidden email] > http://lists.scilab.org/mailman/listinfo/users> > -- Tim Wescott www.wescottdesign.com Control & Communications systems, circuit & software design. Phone: 503.631.7815 Cell:  503.349.8432 _______________________________________________ users mailing list [hidden email] http://lists.scilab.org/mailman/listinfo/users