Guy and Seth on Simulink

Results for: Simulink Tips

Simulink and MATLAB objects 4

Posted by Guy Rouleau,

Simulink and MATLAB objects Recently, I spoke with a user who needed to interface a Simulink model with an external flight simulator implemented as java classes. He was able to exchange data with his simulator at the MATLAB prompt, but was not sure how to make that happen in Simulink. Here is what I proposed. The... read more >>

Implementing an iterative algorithm using the While Iterator Subsystem 7

Posted by Guy Rouleau,

Implementing an iterative algorithm using the While Iterator Subsystem Last week I helped a user implementing an iterative algorithm in Simulink using the While Iterator Subsystem. I thought it would be interesting to share this technique. Example Iterative Algorithm An iterative algorithm is an algorithm that, when called multiple times, converges toward a more and more accurate solution. A well known example... read more >>

Why you should use the Function-Call Split block 3

Posted by Guy Rouleau,

Why you should use the Function-Call Split block Today I had a good discussion with a user regarding the Function-Call Split block introduced in R2010a. On one side, the user claimed that there was no need for a Function-Call Split block. For example, in the following model the Demux block can be used to obtain results similar to the... read more >>

Defining custom shortcuts in Simulink 1

Posted by Guy Rouleau,

Defining custom shortcuts in Simulink On this blog, I sometimes highlight features that it took me a while to appreciate and include in my daily workflow. I hate to admit it, but quite often those are features that I was aware of for a long time, but for various reasons I was scared of using. Most... read more >>

Model Explorer or Command Line? 2

Posted by Guy Rouleau,

Model Explorer or Command Line? Today I would like to ask you a question. This week I received a large model where I wanted to find all the Lookup Table blocks and modify their Index Search Method parameter. Since the model was quite large and I was not familiar with it, manually navigating to each block,... read more >>

Sum Block: Round or Rectangular? 5

Posted by Guy Rouleau,

Sum Block: Round or Rectangular? Working in technical support, I see a lot of Simulink models from users. I have realized that many users do not know how to, or do not take the time to configure the ports of the Sum block. For example, when I see things like this, it makes my eyes hurt... read more >>

Comparing Runs using Simulation Data Inspector 13

Posted by Guy Rouleau,

Comparing Runs using Simulation Data Inspector Do you use the Simulation Data Inspector? Here is an example where it saved me a lot of debugging time. Simulation Accuracy I recently had to validate system behavior and analyze numerical accuracy of a model. Making small modifications in one part of the model was leading to unexpectedly large differences at... read more >>

Zero-Crossing Detection… what are your options? 1

Posted by Guy Rouleau,

Zero-Crossing Detection… what are your options? When using Simulink variable-step solvers, zero-crossing detection is very useful to capture events accurately. However for some equations, configuring zero-crossing detection can be challenging. Last week I received the following question and example model: In the attached model, I implemented a basic bang-bang controller for a plow. Using a Sign block, I... read more >>

I can’t believe it took me 6 months to find that! 10

Posted by Guy Rouleau,

I can’t believe it took me 6 months to find that! This week, after using Simulink R2012b for 6 months, I discovered a little something I find very useful. Closing Tabs I dig through models all day and I always end up with lots of open tabs. Up to now, closing tabs for me meant clicking the x on each tab one by... read more >>

An Ounce of Design Min/Max is Worth…

Posted by Guy Rouleau,

An Ounce of Design Min/Max is Worth… Often, it is worth putting a bit of extra effort at the beginning of a project to save time later. Today I want to introduce a feature that gets more useful with every release of Simulink, but unfortunately I think very few people use it: Signal Ranges How do Signal Ranges work? In... read more >>

These postings are the author's and don't necessarily represent the opinions of MathWorks.