How to compare a Simulink model with empty model?

2 visualizaciones (últimos 30 días)
Sohil Shrestha
Sohil Shrestha el 10 de Nov. de 2022
Comentada: Sohil Shrestha el 17 de Nov. de 2022
I am trying to compare model versions and extract what is added/deleted/modified by querying the difference tree.
Edits = slxmlcomp.compare(ModelA, ModelB).
Is there a neat way to compare an empty model with a model? For instance, I want to compare a Simulink model file that doesnot exist before and a file newly added.

Respuestas (1)

Bhavana Ravirala
Bhavana Ravirala el 15 de Nov. de 2022
For comparing Simulink models, you can also use “visdiff” command which displays the differences between the two specified folders or files.
visdiff(model1.slx,model2.slx);
For more information regarding “visdiff “ command do refer the below documentation:
Hope this helps!!
  1 comentario
Sohil Shrestha
Sohil Shrestha el 17 de Nov. de 2022
I am actually looking to do this programmatically where I am querying the difference tree to get what changed between before and after version of model. Hence I will need to do this using
Edits = slxmlcomp.compare(ModelA, ModelB).
The Edits Object (which is read only ) will have a left and right tree. I need the left tree to have practically nothing (or root only.) I have been doing the comparison by comparing the added file vs deleting content mathworks.com/help/simulink/slref/… . This way of comparison still leaves behind configuration being modified rather than added

Iniciar sesión para comentar.

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by