How can I return from simulink to matlab thread?

4 ビュー (過去 30 日間)
Gun-min Kim
Gun-min Kim 2012 年 5 月 18 日
Hi ! I am currently doing 'real-time audio processing' using simulink and matlab.
Firsly, I built system block for simulink ('record_test.mdl') like this. ( http://www.flickr.com/photos/52197146@N07/7216105684/in/photostream)
Followings are my MATLAB code(.mfile).
(...)
sim('record_test');
(other codes...)
But the process doesn't return from simulink to MATLAB at all.
Is there anyone who can give me some advice? I really appreciate all of your comments.
  2 件のコメント
Kaustubha Govind
Kaustubha Govind 2012 年 5 月 18 日
Do you mean the SIM command hangs your MATLAB script?
Yash
Yash 2012 年 7 月 9 日
yes this will happen in SIM when working with real time audeio

サインインしてコメントする。

採用された回答

Guy Rouleau
Guy Rouleau 2012 年 5 月 18 日
SIM is blocking, it will return to your script only when the simulation terminates.
If you want to start a simulation from command line in a non-blocking way, you can use:
set_param(modelname,'simulationcommand','start')
That way your script will continue to the next line once the simulation is started, without waiting for it to complete.
  1 件のコメント
K E
K E 2012 年 7 月 10 日
I did not know this, so thanks.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCode Generation and Deployment についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by