Re: S-function Builder and Dynamic Arrays
- From: "Praetorian" <ashish.sadanandan@xxxxxxxxx>
- Date: 30 Mar 2006 10:45:18 -0800
Adrian Suszko wrote:
Does anyone know if the s-function builder can use an array of
unknown size (ie a dynamic array) as input. If so how? There is a
column where you are supposed to specify the row size but if this is
unknown until the simulation runs what value should go there?
You can try putting -1, this the value that simstruc.h defines for the
enum DYNAMICALLY_SIZED which is what you'd use for dynamically sized
inputs. But I doubt the SFunction builder wizard supports this. I'd set
some default size, let the wizard create the SFunction, then edit the C
file manually and recompile it. Search help for the callback routines
that Simulink invokes when executing SFunctions, you'll need to use
these if you specify input port dimensions as DYNAMICALLY_SIZED; you
can use either ssSetInputPortMatrixDimensions or
ssSetInputPortVectorDimension for this.
Good luck,
Ashish.
.
- References:
- S-function Builder and Dynamic Arrays
- From: Adrian Suszko
- S-function Builder and Dynamic Arrays
- Prev by Date: Re: GUI question
- Next by Date: Re: Problem with directories in ML compiler generated DLL
- Previous by thread: S-function Builder and Dynamic Arrays
- Next by thread: Calling matlab function in C code
- Index(es):
Relevant Pages
|