Guy on 金宝appSimulink

金宝appSimulink & Model - -based Design

Leveraging the Model Comparison to find what you need

Today I want to share an example of how I sometimes use The Model Comparison To answer the questions ab金宝appout Simulink blocks or models. While this is obviously a key part of the workflow to merge branches in a project under source control as I described in Three - Way Model Merge and Git , model comparison can also be 2 answer subtle "how-to" questions.
Let 's look at a simple example of question I received today and how I informs the model comparison to answer it.

The Question

The question I received today is:
"Hi, Guy, do you know of a programmatic way to flip a block on the horizontal axis?"
I did not know the response off the top of my head, but here is how I figured it out.

Before and After

The first thing I do in this kind of situation is making an example to confirm my understanding of The question. For that, I created a simple Subsystem with what ports all around and masked it to make The behaviors as obvious as possible.
Then I made the requested modification interactively, using the Format Tab of the toolstrip:

Comparing Before and After

I saved two versions of this simple model, one before the change, and one after. Then simple right - I clicked on the two files in the Current Folder Browser and selected Compare Selected Files/Folders :
In the comparison results, I disabled the filter for Nonfunctional Changes and I could immediately identify the two parameters men to flip a block horizontally:

Validating the Results

To confirm that the parameters identified by the Model Comparison were what I men, I demonstrate this simple script:
FlipExample2. GIF

Now it 's your turn

You sometimes using the Model Comparison tool to identify subtle differences between blocks, Subsystems or models?Or to find the parameter you are & the for?
Let us know in the comments below.
|

comments

To comment, please clickhereLog in to your MathWorks account or create a new account.