Friday, March 29, 2024
HomeMatlabLeveraging Mannequin Comparability to seek out what you want » Man on...

Leveraging Mannequin Comparability to seek out what you want » Man on Simulink


Right this moment I wish to share an instance of how I generally use Mannequin Comparability to reply questions on Simulink blocks or fashions. Whereas that is clearly a key a part of the workflow to merge branches in a venture below supply management as I described in Three-Approach Mannequin Merge and Git, mannequin comparability will also be used to reply refined “how-to” questions.

Let’s take a look at a easy instance query I obtained in the present day and the way I used mannequin comparability to reply it.

The Query

The query I obtained in the present day is:

“Hello Man, are you aware of a programmatic option to flip a block on the horizontal axis?”

I didn’t know the response off the highest of my head, however right here is how I figured it out.

Earlier than and After

The very first thing I do in this sort of scenario is making an instance to verify my understanding of the query. For that, I created a easy Subsystem with a couple of ports throughout and masked it to make the conduct as apparent as attainable.

Then I made the requested modification interactively, utilizing the Format Tab of the toolstrip:

Evaluating Earlier than and After

I saved two variations of this easy mannequin, one earlier than the change, and one after. Then I merely right-clicked on the 2 information within the Present Folder Browser and chosen Examine Chosen Recordsdata/Folders:

Within the comparability outcomes, I disabled the filter for Nonfunctional Modifications and I may instantly establish the 2 parameters wanted to flip a block horizontally:

Validating the Outcomes

To verify that the parameters recognized by the Mannequin Comparability had been what I wanted, I wrote this easy script:

FlipExample2.gif

Now it is your flip

Are you generally utilizing the Mannequin Comparability device to establish refined variations between blocks, Subsystems or fashions? Or to seek out the parameter you’re in search of?

Tell us within the feedback beneath.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments