Guy on Simulink

Simulink & Model-Based Design

Posts 31 - 40 of 52

Results for: Modeling

Sample Time Offset 6

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... read more >>

Generating Code for Real-Time Multicore Systems 2

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... read more >>

Continuous sample time inside For Each Subsystem 7

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... read more >>

Troubleshooting the Transport Delay Block 2

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... read more >>

How Do I Change a Block Parameter Based on the Output of Another Block? 48

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... read more >>

Kalman Filter – From MATLAB to Embedded C Code 9

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... read more >>

Causes of Algebraic Loops 1

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... read more >>

A Better If-Else Construct 16

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 =... read more >>

My Mental Model of a Model 2

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... read more >>

Models Inspired by Real Life 21

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... read more >>

Posts 31 - 40 of 52