MATLAB Answers


How to work on objects in the workspace from Simulink

FP24 님이 질문을 제출함. 4 Sep 2018
최근 활동 FP24 님이 댓글을 추가함. 7 Sep 2018
I'm using the Automated Driving Toolbox, for example. It provides some objects data type (vehicle, actor, drivingScenario) that i use in matlab, but i can not use them (read or modify) from the simulink model, also if these objects are already defined in the base workspace that this simulink model can access.
Thank you in advance for you help Cheers

  댓글 수: 0

로그인 to comment.

답변 수: 1

TAB 님의 답변 5 Sep 2018

If these objrcts are not supported by any Simulink toolbox, then you can not use them directly in Simulink.
But you can extract required numeric values/array/matrix from these objects, save them in base workspace and use them for further processing in Simulink.
For value extraction you can run your Matlab code/function in Model Callback or Block callback functions of simulink.

  댓글 수: 1

thanks. But if I need to use some functions (provided in the same toolboxes) on these objects? For example I need the function targetOutlines(ac), where ac is an actor object defined in the Automated Driving Toolbox. How can I do? Thank you again

로그인 to comment.

Translated by