Simulink Mask initialization command and RuntimeObject
조회 수: 3 (최근 30일)
이전 댓글 표시
Here is code for my mask initialization I want to use it to change the color according to outputs of one of the blocks
systems = find_system(gcb,'LookUnderMasks' , 'on', 'FollowLinks','on', 'SearchDepth', 1,'regexp','on','Name','Multi');
rto=get_param(systems{1,1},'RuntimeObject')
if rto.OutputPort(1).Data == 1
set_param(gcb,'BackgroundColor','red')
else
set_param(gcb,'BackgroundColor','green')
end
When I press OK I get `Error: Dot indexing is not supported for variables of this type`
When I use `keyboard` to debug I get this
K>> rto
rto =
handle
It seems that it can't get the runtimeobject but when I do this while still in debug mode
rto=get_param(systems{1,1},'RuntimeObject');
while debugging I did get it
rto =
Simulink.RunTimeBlock
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!