How do I get the elements of the bus inside a variable from the data dictionary?
조회 수: 17 (최근 30일)
이전 댓글 표시
Hi,
I am having buses in the data dictionary I want to fetch the elements inside the bus.
How do I get the Element.
I have tried
allEntries = find(dd_SectObj, '-value', '-class', 'Simulink.Bus');
%% find all the buses.
foundOutIdsEntries = find(allEntries, '-regexp', 'Name', 'SLMS_BUS_out_ids_*')
%% check for all Output buses.
le = length(foundOutIdsEntries);
for j = 1 : le
abc = foundInEntries(j).Value;
end
How do I get those elements?
답변 (1개)
Donn Shull
2019년 7월 27일
Insted of Value you should use getValue ie:
for j = 1 : le
abc = foundOutIdsEntries(j).getValue;
% place code dealing with Entries here ie:
% entryList = abc.Entries
end
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Types에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!