Guy and Seth on Simulink

Results for: Numerics

Why do we need Stiff ODE Solvers? 1

Posted by Guy Rouleau,

I hope you have noticed the new MATLAB Central blog: Cleve's Corner. Cleve once said "stiffness is an efficiency issue." Let's explore this from a Simulink point of view by revisiting an article by Cleve in MATLAB News and Notes, May 2003: Stiff Differential Equations.... read more >>

Wrong Answers and Gimbal Lock 6

Posted by Guy Rouleau,

By Guy Rouleau I received a request last week where the code generated using Real-time Workshop was giving different answers from the original simulation. This type of requests is the one that scares me the most, because the goal of Real-Time Workshop is to generate a code equivalent to a Simulink... read more >>

Round-off Error

Posted by Seth Popinchalk,

Loren recently posted a simple example of how single-threaded computations might produce different results from multi-threaded computations.  The cause is floating-point round off, and most people are surprised to learn that the "different" results actually agree!  In this post, I want to explore this same example in Simulink.... read more >>

Floating-Point Numbers 6

Posted by Seth Popinchalk,

Numeric simulation is all about the numbers.  In a previous post, I talked about integer and fixed-point number representations.  These numbers are especially useful for discrete simulation and embedded systems.  For continuous dynamic systems, the values do not represent discrete values but continuously changing functions in time.  For this, floating-point numbers provide the flexibility and range... read more >>

How do I test for NaN in Simulink R2009b? (NEW!) 2

Posted by Seth Popinchalk,

Back in February 2009 I posted about how to test for NaN in Simulink.  The approach I talked about was more of a logical experiment based on the special properties of NaN than an ideal software solution.  In Simulink R2009b the Relational Operator block got an upgrade to include isNaN.  Let’s see how it... read more >>

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