How can I feed an array of data to my Simulink model when an event occurs?

Im feeding the array by a block called 'signal from workspace', and I want to start feeding this data when some distance is less then for example 50. I wrote a matlab fcn that checks the condition and returns zero or one. I also tried to use a trigger block from simulink, but it doesn't give good results when I simulate( it seems like that it did miss to feed the data).
I would appreciate if anyone could help out on how to feed pre-specified data to simulink based on events.
/Shant

 채택된 답변

Anuj
Anuj 2013년 12월 20일
편집: Anuj 2013년 12월 20일

0 개 추천

You can use callback functions in your model.. have you tried this ?<http://www.mathworks.in/help/simulink/ug/model-callbacks.html?searchHighlight=callbacks >

댓글 수: 1

No, I haven't actually. I will read about it and try to implement it. Thank you for the help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Event Functions에 대해 자세히 알아보기

제품

질문:

2013년 12월 20일

댓글:

2013년 12월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by