Importing matlab values into Simulink Stateflow

I am using simulink stateflow for my controller. This controller has to receive data from another computer using UDP protocol. I have written a matlab function to receive the data (as the udp model in simulink doesn't work well with my model). In my matlab function, when new data is received, it is processed by the datagramrecivedFcn callback function and an output is produced. However I am not sure on how I can transfer the output from the callback function directly into my stateflow model.
Can anyone please provide some advice, thanks in advance!

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2012 年 7 月 25 日

1 投票

You should probably use one of the three MATLAB Function blocks to call your MATLAB code as part of the model.

カテゴリ

ヘルプ センター および File ExchangeSimulink Functions についてさらに検索

製品

質問済み:

2012 年 7 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by