From: thorben on
Hi All,

is there a function which returns a list of all parameters needed by a simulink block diagramm? Of course no fix values (e.g. in a costant block), but all the names of variables which have to be in base work space to run the model.

Thank you very much.
From: Gavin Walker on

"thorben " <thorben.herfeld.remove.this(a)dmecs.de> wrote in message
news:i3b8m5$osa$1(a)fred.mathworks.com...
> Hi All,
>
> is there a function which returns a list of all parameters needed by a
> simulink block diagramm? Of course no fix values (e.g. in a costant
> block), but all the names of variables which have to be in base work space
> to run the model.
>
> Thank you very much.

Take a look at Simulink.findVars

Gavin



From: MFcn on
"Gavin Walker" <gwalker(a)nospam-mathworks.com> wrote in message <i3e3an$q86$1(a)fred.mathworks.com>...
>
> Take a look at Simulink.findVars
>
> Gavin
>
>

Thanks, but unfortunately I'm restricted to Matlab 7.1 in the current project. As far as I know is this a new feature available in release 2010a

T.
From: checker i on
"MFcn " <thorben.herfeld.remove.this(a)dmecs.de> wrote in message <i3e5p9$nn$1(a)fred.mathworks.com>...
> "Gavin Walker" <gwalker(a)nospam-mathworks.com> wrote in message <i3e3an$q86$1(a)fred.mathworks.com>...
> >
> > Take a look at Simulink.findVars
> >
> > Gavin
> >
> >
>
> Thanks, but unfortunately I'm restricted to Matlab 7.1 in the current project. As far as I know is this a new feature available in release 2010a
>
> T.

Have you tried
modelParams = get_param(modelName,'ReferencedWSVars');

This should give you a list of workspace parameters that are actually getting used in the model.
From: MFcn on
"checker i" <checker.im(a)gmail.com> wrote in message
>
> Have you tried
> modelParams = get_param(modelName,'ReferencedWSVars');
>
> This should give you a list of workspace parameters that are actually getting used in the model.

thank you checker i,

Yes, I have tried this. But I have the problem that this function only works if the parameters are already in the workspace. If they are not, I get an error message. In general this is exactly what I'm looking for, but I need this function before the parameters are loaded to workspace, because i have to manipulate them before.