How to batch editing scope parameters in Simulink with model explorer(Model explorer does not show some properties of Scope)

조회 수: 1 (최근 30일)
I want to disable the datalogging function of scope in one Simulation file. It is time-consuming to modify them manually. One possible way I found is to utilize the Model Explorer in Simulink. It is fine to use this tool to batch editing some block properties. However, specifically for scope, it cannot show some properties of scope I want to modify,e.g., timespan, DataLogging. Is this the bug for Model Explorer or I do something just wrong? Please find the screenshot of my Model Explorer. Thanks.

채택된 답변

Christopher Wallace
Christopher Wallace 2018년 7월 23일
I'm not sure about Model Explorer, what version of Matlab are you using? I tried on 2017a and it seemed to work fine.
Another option you could try would be to use 'find_system' to get the handles of all of the scopes and then use 'set' to update the properties for all of the scopes.
ex.
rootHndl = get_param(bdroot, 'Handle')
scopeHndls = find_system(rootHndl , 'BlockType', 'Scope')
set(scopeHndls, 'DataLogging', 'on')
  댓글 수: 1
Ren Ren
Ren Ren 2018년 7월 23일
Matlab R2017b
It is weird. Model Explorer does not work for Scope in R2017b. Anyway, another option you mentioned works fine. Thanks so much!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by