How to change filter settings for slxmlcomp.compare?

조회 수: 13 (최근 30일)
Monika Jaskolka
Monika Jaskolka 2020년 7월 25일
편집: Monika Jaskolka 2020년 9월 25일
I am using the slxmlcomp.compare function to compare two Simulink models programmatically. However, when there is a change to the Description parameter of a model (i.e. Model Properties > Description), it does not show up in the Edits object. This is because the Nonfunctional Changes filter is on. How can I turn it off?
  댓글 수: 2
Hannes Siegl
Hannes Siegl 2020년 9월 25일
I tried this visdiff as well. However, it is not clear for me, how to set the filters and how to get the Edits object to workspace by an API call. visdiff returns a SimulinkModelComparison object.
Monika Jaskolka
Monika Jaskolka 2020년 9월 25일
편집: Monika Jaskolka 2020년 9월 25일
To change the filters with visdiff you can do:
comparison = visdiff('test1','test2');
filter(comparison, 'unfiltered');
The results can be viewed using the publish function, which by default publishes the results as an HTML file.
file = publish(comparison);
web(file)
I don't think there is a way to convert from a SimulinkModelComparison object to an Edits object.
At this point, if you want to programmatically parse the SimulinkModelComparison results, you probably need to parse the HTML directly, using command such as these.
Otherwise, I wrote the Model Comparison Utililty that can query the Edits object.

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

채택된 답변

Monika Jaskolka
Monika Jaskolka 2020년 8월 1일
I contacted MathWorks support. It is currently not possible to change filters from the command line using the slxmlcomp.compare function. The only alternative is to use the visdiff function instead, which produces different output.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Model Order Reduction에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by