필터 지우기
필터 지우기

Get the Model's Sorted Execution Order Programmatically

조회 수: 8 (최근 30일)
Matteo
Matteo 2014년 11월 3일
댓글: Jianfei 2024년 3월 29일
Hello, I can display the Sorted Execution Order of a model as described at [1]. Is there a way to obtain the very same information programmatically from the command line in some "manipulable" form (e.g., cell array of strings in sorted order notation [2], etc.)?
get_param(gcs,'SortedOrder') is not what I want, because it enables the display of the sorted order on the diagram.
The sldebug/slist combination [3] displays the answer on the Matlab's console (basically at this point, I'd need to redirect the output to a variable to read/interpret it; any hint?).
Any other idea/approach?
  댓글 수: 1
Nesredin Mahmud
Nesredin Mahmud 2017년 1월 17일
hello,
Unfortunately, I am also like you, looking for a similar functionality. Thank you for raising the question :)
Best, /Nas

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

답변 (1개)

Mark Lin
Mark Lin 2018년 4월 11일
Can we try using:
sortedlist = get_param(bdroot, 'SortedList');
While this will not give the s:b format as displayed in the model. It will return a vector of block handles with b - 1 as indices.
If you want to inspect the sort order of an Atomic Subsystem in your bdroot then give the handle of that subsystem instead of bdroot:
sortedlist_of_asys = get_param(gcbh, 'SortedList');
  댓글 수: 1
Jianfei
Jianfei 2024년 3월 29일
Strange. Some of the output handles are not valid ...

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

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by