I noticed that many users are not aware that it is possible to specify sample time offsets in Simulink. Scalar Sample Time In this simple model, I have specified the sample time of the Constant... 続きを読む >>
I noticed that many users are not aware that it is possible to specify sample time offsets in Simulink. Scalar Sample Time In this simple model, I have specified the sample time of the Constant... 続きを読む >>
Do you generate code to be executed on a multi-core processor? Wouldn't it be cool if you could decide which part of the model will execute on which core? Modeling Concurrent... 続きを読む >>
Back in 2010, I wrote a post explaining how to apply a scalar algorithm to a vector using the For Each subsystem. At that time, only discrete algorithms could be vectorized that way. In R2011b, the... 続きを読む >>
Yesterday I came across this model: At first look, one might think that these two implementations should give the same results. However this is not the case because the delayed data is... 続きを読む >>
By Guy Rouleau One question I often receive is: How can I change the value of a block parameter while the simulation is running? A good example of this type of question is the following: How do... 続きを読む >>
By Guy Rouleau In a previous post, I introduced the Embedded MATLAB Function block. This block gives the possibility to write an algorithm in MATLAB code, include it in a Simulink model, and... 続きを読む >>
A lot of people ask the question, "Why does my model have an algebraic loop?" Of course, every model is different, but here are some general truths about algebraic loops: Real physical systems... 続きを読む >>
In a previous post, I answered a question about how to model an If-Else behavior. Here I will restate the algorithm I want to create: if(sel==0) out = 2*in1; elseif (sel==1) out =... 続きを読む >>
When you are new to something, it always helps to get a mental picture of how that something works. Since I learned Simulink over 10 years ago, I have developed my own mental model of Simulink... 続きを読む >>
Often models are the predecessor to a real-life device; however, sometimes a device inspires the model. In the 1980s, there was a group known as the Leg Lab at CMU who researched running robots. In... 続きを読む >>