Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Ads

Discussion Groups

Discussion Groups | Matlab DSP | Is it possible to call simulink function from VB?

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

Is it possible to call simulink function from VB? - Ah_Nee - Mar 13 9:37:00 2005





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





(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: Is it possible to call simulink function from VB? - Michael Burke - Mar 13 14:28:00 2005


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

__________________________________





(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )