Sending a floating value from simulink model to workspace

조회 수: 2 (최근 30일)
cyberdyne
cyberdyne 2011년 10월 17일
Hi,
I have a simulink model with some output variables and I should use them in a realtime elaboration by m-file algorithms. For example I need to plot in 3d space an output position from model and so create a realtime 3d plotting. Ho can I do it ?
I've tried to use 'To Workspace' block but it doesn't allow to use variable value before simulation end (as realtime using).
Thanks

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2011년 10월 17일
See Accessing Block Data During Simulation. There is also a great demo that you can start with as an example:
>> sldemo_msfcn_lms
Start the simulation and double-click on the box where you are instructed to do so. The simulation runs for infinity, and the plot is continuously updated during simulation.
  댓글 수: 2
cyberdyne
cyberdyne 2011년 10월 17일
but I don't want an infinity simulation time. Can I apply it for limited time too ?
Kaustubha Govind
Kaustubha Govind 2011년 10월 17일
Yes, you should be able to use for limited time as well.

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by