Guy on Simulink

Simulink & Model-Based Design

What’s New in R2018b!

MATLAB R2018b is now available! In this first post about R2018b, I decided to highlight enhancements to the Simulink editor that will hopefully speed up model creation.

Group Block Rotation and Flip

I reorganize models all the time, and I am picky on the style. This means that I often need to flip and rotate blocks. Before R2018a, I was running into situations like this one very often:

Flipping group of block before R2018b

See how easier it is in R2018b. Now when I select a group of blocks and hit Ctrl+I, the entire group flips:

Flipping group of blocks in R2018b

Connect Blocks More Quickly

In R2018b, if you click on a port, compatible ports are highlighted, and you can click on one of them to make the connection. No more need to hold the mouse and drag.

Connecting ports

Add Ports More Easily

When hovering over the edge of blocks that can have multiple ports, you now have the possibility to create new ports. Here is an example using a Subsystem and a Bus Selector.

Port Sprouting

A smarter quick insert

We added a few mechanisms to help the Quick Block Insert feature to provide smarter suggestions. The first one is that it learns the blocks you use the most and ranks them higher.

To highlight the effect of this feature, in the next image I show the result for typing "si". In R2018a, I often ended up inserting mistakenly the Sine Lookup Table block instead of the Sine Wave source block. After using R2018b for just a few days, it now knows that I use the Sine Wave source block more often and ranks it higher.

Smart insert based on history

See this documentation page if you want to customize the way the algorithm learns. For example, the function slblocksearchdb.trainfrommodelsindir can scan all the models in a specific folder and use them to train the algorithm.

If you drag a line from a port, you can now double-click on its unconnected end and you will get a list of the blocks most likely needed next. For example, after a Gain block I am likely going to do more math like additions and subtractions. For a Mux block, I am more likely to use blocks like Rate Transition or Signal Conversion.

Contextual smart suggestions

See how it helps me creating a Mass-Spring-Damper system without typing anything and without opening the library browser.

Quick Insert in context

Edit and Tune Parameters Without Opening Block Dialog

For some blocks, we added the possibility to edit and tune parameters without opening the block dialog, directly in the canvas. This works both during edit-time and while the simulation is running.

Tuning Parameters in canvas

Simscape Buses

As requested by many users, it is now possible to combine multiple Simscape connections into one bus. Notice in the following animation how the Simscape Bus block leverages many of the enhancements mentioned above. You can configure it entirely from the canvas, without opening any dialog box.

Simscape Buses

Now it's your turn

Did you already go through the R2018b release notes? Let us know in the comments below what is your favorite new feature and which ones you would like to see described on this blog.

|
  • print

Comments

To leave a comment, please click here to sign in to your MathWorks Account or create a new one.