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.
Is it possible to call simulink function from VB?
Started by ●March 13, 2005
Reply by ●March 13, 20052005-03-13
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
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,
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.
> Pei Nee >