[Scilab-users] Non-linear ODE uder xcos and integration using C
pepe
peter.balazovic at yahoo.com
Sat Jan 26 10:39:07 CET 2013
Hello all,
I wonder how to do an inegration under xcos. I want to have this
encapsulated within C function which is model function for user-defined
block. Other words I want to create my own model of system. I want to solve
its nonlinear ODE of system.
/example:/
#include "scicos_block4.h"
#define U ((SCSREAL_COP *)GetRealInPortPtrs(blk, 1))
#define Y ((SCSREAL_COP *)GetRealOutPortPtrs(blk, 1))
#define X ((SCSREAL_COP *)GetState(blk))
#define dX ((SCSREAL_COP *)GetDerState(blk))
#define Xk ((SCSREAL_COP *)GetDstate(blk))
#define W ((SCSREAL_COP *)GetWorkPtrs(blk))
#define G (GetGPtrs(blk))
#define J (GetJrootPtrs(blk))
#define M (GetModePtrs(blk))
void model(scicos_block *blk, int flag)
{
int i;
switch (flag)
{
case Initialization:
break;
case Ending:
break;
case DerivativeState:
break;
case StateUpdate:
break;
case OutputUpdate:
break;
default:
break;
}
}
I am not familiar with scilab/xcos possibilities, I am looking for more
insights and understand how it works.
Which block to use for this from the palette?
How to add a C function to the block?
How to pass inputs,ouputs,parameters?
Is there simple example (Van Der Pool)?
Possibilities to solve non-linear ODE equation?
Thank you very much for your help!
Best regards,
Peter
--
View this message in context: http://mailinglists.scilab.org/Non-linear-ODE-uder-xcos-and-integration-using-C-tp4025763.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.
More information about the users
mailing list