Compare the contents to 2 subsystems within Simulink
19 views (last 30 days)
Show older comments
Is there an easy way to compare the contents of 2 subsystems in MatLab? I want to take one subsystem and check it against another to ensure the contents of both are the same. I didn't want to try to create a loop that'll take all the block from the subsystems and loop through them checking each parameter of each block to make sure all the logical operator are the same.
Michael Haderlein on 7 May 2015
I don't know what you mean with "subsystem", but if you have two variables with any kind of data (no matter if it's a struct or a cell or a numerical array) and you want to check for equality, use isequal(var1,var2).
N Kando on 12 Jul 2017
Edited: N Kando on 12 Jul 2017
Find more on Subsystems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!