Reply by Michael Burke March 13, 20052005-03-13

Per Ne,

I have not done this with Visual basic but I have with Java, the
principal is the same.
First it depends on what you mean by 'calling' If you want to run a
simulation and get data from it then all you need is to be able to
execute matlab comands from visual basic. I'm assuming you know how to
read and write data from the Matlab workspace through Visual basic;
likewise how to evaluate commands in the matlab environment through VB.
To run a simulation then what you need to do is (with the appropriate
VB warpper)

1.) eval(['[T,X,Y] = SIM('model',TIMESPAN,OPTIONS,UT)'])
2.) get(vars) Beyond that if you want to influance a running simulation you can do
that through workspace variables. For example if you have a switch
based on a constant,
1.) set(const_value)

I hope that Helps.
--- Ah_Nee <> wrote:
>
>
> Hi all,
>
> Anyone know how to call simulink model from Visual Basic? I know
> how to call matlab file only. But, I dont know how to call simulink
> model. Or is there any way to convert simulink model to .m file?
>
> I really need to know the method urgently. Anyone who know
> about it, please tell me.
>
> regards
> Pei Nee >
>
__________________________________



Reply by Ah_Nee March 13, 20052005-03-13


Hi all,

Anyone know how to call simulink model from Visual Basic? I know
how to call matlab file only. But, I dont know how to call simulink
model. Or is there any way to convert simulink model to .m file?

I really need to know the method urgently. Anyone who know
about it, please tell me.

regards
Pei Nee