필터 지우기
필터 지우기

sending online data from work space to simulink

조회 수: 1 (최근 30일)
zahra hosaini
zahra hosaini 2021년 9월 2일
답변: zahra hosaini 2021년 9월 7일
hi everyone
in the below program , while we are in the loop quantity of k dose not change in workspace and stays on a specific numer(0 or its last number from the last run). but i need it to be updated for each loop. i also need its updated form in simulink. i used "from workspace" block in simulink with a display but since the parameter dose not change in workspace(till the run is complete-not even pause updates parameters-) display , freezes on a single number.
any idea to fix this?
(i have tried changing sample time in "from workspace" block but it was no use)
for i=0: 0.01:1
k=k+1;
pause(1);
end
*in the picture u can see the difference between live data and what is stored in workspace.

답변 (1개)

zahra hosaini
zahra hosaini 2021년 9월 7일
found the answer here:
https://ch.mathworks.com/matlabcentral/answers/535995-how-to-pass-a-changing-value-from-workspaces-to-simulink?s_tid=answers_rc1-3_p3_Topic

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by