How can i acces to object matlab in stateflow

조회 수: 2 (최근 30일)
Louis
Louis 2017년 1월 17일
댓글: Louis 2017년 1월 31일
Hello, I have a script in InitFcn callback to display a webmap and a wmmarker. In my Chart, i want to remove this wmmarker and situate at a other place. i can acces to a vector of double in the worspace, but not to a handle of wmmarker. I have this fault: Expression 'map.webmap.MarkerOverlay' for type of data 'h1' did not evaluate to a valid type. is it a good idea to update a webmap with a chart stateflow?

채택된 답변

Jordan Ross
Jordan Ross 2017년 1월 24일
Hello Louis,
From the screenshot you provided the error is due to the fact that a Simulink.Parameter can not have a type of "map.webmap.MarkerOverflay".
Since in your "InitFcn" callback you are creating the handles in the base workspace you can just have a MATLAB Function in your Stateflow chart that operates on that map handle. Attached is an example constructed in R2016b which accesses objects in the base workspace when using either the MATLAB Action language or the C action language.
  댓글 수: 1
Louis
Louis 2017년 1월 31일
it's ok. i manipulate the object directly in the workspace with the "evalin('base','expression')" instruction. thank's

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by