I have to admit, in my day-to-day work, I spend a lot more time debugging Simulink models that produce unexpected results than creating new ones. Since I have access to AI coding agents, I have had a lot of success speeding up debugging sessions and getting deeper insights than I could have dreamed of before. Today I decided to share one example of this kind of debugging.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Guy Rouleau
Behavioral Models with Agentic-AI-powered MBSE
Today I am happy to welcome backSarah DagenfromMathWorks Consulting Servicesfor another visit to the Galactic Soup Factory! . When we left off using agentic AI and MBSE to design an intergalactic soup factory, we were evaluating 3 physical design variants. I am continuing the trade study in this article, but this time it is based on dynamic simulations rather than static analysis.
Ancestry-specific and multi-ancestry genome-wide association studies of restless legs syndrome
Abstract Restless legs syndrome is a neurological disorder that disrupts sleep and quality of life, but its genetics have mostly been studied in individuals of European ancestry. Here, we perform GWAS of restless legs syndrome using data from individuals of African, Latin American, and European ancestry, followed by a multi-ancestry meta-analysis. We leverage biobank-based cohorts that established RLS diagnosis using validated clinical criteria, allowing for precise phenotypic characterization.
Best Practices for Large Simscape Models
I have been supporting users of Simulink and Simscape for many years. During this time, I built up in my head a list of best practices that I systematically go through when I receive new Simscape models from colleagues and customers. In this post, I will share that checklist, with examples. Before getting started, a few disclaimers: It's not a must to follow all those practices 100% of the time.
What’s New in R2026b?
MATLAB R2026b is now available. Here are my favorite enhancements. Published Referenced Models In R2026b, you will notice a new Publish button in the Simulink toolstrip: When publishing a model, a new SLXP file is created. This file contains a precompiled, ready-to-run version of the model. As a result, models that reference a published model can initialize quickly by skipping rebuild checks and using the precompiled version in the SLXP file.
Trade Studies with Agentic-AI-powered MBSE
Today I am happy to welcome backSarah DagenfromMathWorks Consulting Services. . In my previous post, I used an agentic AI workflow to create an initial system design for an intergalactic soup factory. That first pass produced a single design based on the RFLP (Requirements-Functional-Logical-Physical) methodology. Getting one architecture out of an agent is nice, but real systems engineering is about choosing between alternatives.
Building and Controlling a Gantry Crane with Simulink, Simscape Multibody, and Codex
A few days ago, my colleague Ned Gulley published this blog post: Simulate in MATLAB, Animate in Blender. Ned simulated a sliding gantry crane supporting a heavy swinging load and then controlled it to swing the load above a wall. Here is what the final result looks like: In his post, Ned did not include the code, but he mentions that he implemented the simulation and animation workflow in MATLAB. My first reaction was: Why implement that in MATLAB when we have Simscape Multibody?
My Scuba Diving Simulator – Part 2
In my previous post, I modeled a scuba diver using custom Simscape components. I was happy with the components and the overall plant model, but I was not fully satisfied. Each component behaved as expected, and the assembled diver system handled simple maneuvers correctly. However, I had not figured out yet how to control the buoyancy control device (BCD) and breathing together like real divers do during a full one-hour dive.
My Scuba Diving Simulator
I recently took a week of vacation to go scuba diving in the Caribbean. In the middle of a dive, at about 80 feet down, this idea came to my mind: I need to make a scuba diving simulator! I have thought about creating this simulation before, but I always ended up struggling with one thing or another. Typically, I would get stuck when trying to add the effect of depth on the diver's lungs and the buoyancy control device (BCD).
MathWorks Automotive Conference and Model Referencing
I recently attended the MathWorks Automotive Conference. This was a great opportunity to connect with industry experts and see how they use MATLAB and Simulink. During the conference, I gave a presentation titled Building Efficient and Fast Models: Sharing User Experience. I thought some readers may find the topic useful, so I decided to summarize the main points here.
Ageing populations make brain health urgent issue for G7 Nations
Housed within a bony skull, the human brain remains, in large part, a mystery to all of us in the medical community. Structurally complex with a challenging anatomy, the brain is believed to comprise more than 3,000 different types of cells, whereas most tissues have no more than a dozen. It is dynamic, reacting to the environment and changing over time. It is also difficult to access and is rarely biopsied. And yet the brain is the essence of who and what we are.
La santé du cerveau : une priorité pour les pays du G7
Le cerveau humain, logé dans un crâne osseux, demeure en bonne partie un mystère pour l’ensemble de la communauté médicale. Avec sa structure et son anatomie complexes, le cerveau compterait plus de 3 000 types de cellules, alors que la plupart des tissus n’en comptent pas plus d’une douzaine. C’est un organe dynamique, qui réagit à son environnement et évolue au fil du temps. Il est également difficile d’accès et fait rarement l’objet d’une biopsie.
Genetic associations between post-traumatic stress disorder and REM-sleep behavior disorder
|
By Lang Liu, Farnaz Asayesh, Jamil Ahmad, Isabelle Arnulf, Pauline Dodet, Yo-El S. Ju, Jacques Montplaisir, Jean-François Gagnon, Alex Desautels, Abubaker Ibrahim, Ambra Stefani, Birgit Högl, Alex Iranzo, Monica Serradell, Angelica Montini, Gerard Mayà, Carles Gaig, Gian Luigi Gigli, Mariarosaria Valente, Francesco Janes, Andrea Bernardini, Yves Dauvilliers, Karel Sonka, David Kemlink, Petr Dusek, Michael Sommerauer, Gültekin Tamgüney, Michela Figorilli, Monica Puligheddu, Wolfgang Oertel, Annette Janzen, Elena Antelmi, Brit Mollenhauer, Michele Terzaghi, Giuseppe Fiamingo, Matej Skorvanek, Kristina Kulcsarova, Beatriz Abril, Luigi Ferini-Strambi, Jitka Bušková, Beatrice Orso, Pietro Mattioli, Dario Arnaldi, Femke Dijkstra, Mineke K. Viaene, Bradley F. Boeve, Owen A Ross, Guy Rouleau, Lee Neilson, Jonathan Elliott, Miranda M Lim, Ronald B. Postuma, Ziv Gan-Or, Morvarid Ghamgosar Shahkhali, Mohammad H. Ghamgosar Shahkhali, Meron Teferra, Michele T. M. Hu, Merve Aktan-Süzgün, Valerie Cochen De Cock, Friederike Sixel-Doring
|
Nature
Verified
Abstract Isolated/idiopathic rapid-eye movement (REM) sleep behavior disorder (iRBD) is, in most cases, an early form of α -synuclein-related neurodegenerative diseases, including Parkinson’s disease and dementia with Lewy bodies. Clinical reports suggest that iRBD is more common in individuals with Post-Traumatic Stress Disorder (PTSD) compared to those without PTSD.
Why brain health is an urgent priority for G7 member countries
Structurally complex with a challenging anatomy, the brain is believed to comprise more than 3,000 different types of cells, whereas most tissues have no more than a dozen. It is dynamic, reacting to the environment and changing over time. It is also difficult to access, and rarely biopsied. To flourish, our societies and economies depend in large part on our brains’ ability to function optimally.
Why brain health is an urgent priority for G7 member countries Original
Housed within a bony skull, the human brain remains, in large part, a mystery to all of us in the medical community. Structurally complex with a challenging anatomy, the brain is believed to comprise more than 3,000 different types of cells, whereas most tissues have no more than a dozen. It is dynamic, reacting to the environment and changing over time. It is also difficult to access, and rarely biopsied. And yet the brain is the essence of who and what we are.
Why brain health is an urgent priority for G7 member countries
© 2026 Tolerance.ca ® Inc. All reproduction rights reserved. All information reproduced on the Web pages of www.tolerance.ca (including articles, images, photographs, and logos) is protected by intellectual property rights owned by Tolerance.ca ® Inc. or, in certain cases, by its author. Any reproduction of the information for use other than personal use is prohibited.
Opinion: Quebec’s aging population demands move to new model of brain care
Guy Rouleau, Special to the Montreal Gazette A modern facility physically connected to the MUHC would allow specialized clinical teams to work together in one location, reducing patient transfers and improving co-ordination, safety and efficiency, writes Dr. Guy Rouleau, director of the Montreal Neurological Institute-Hospital. JOHN MAHONEY / MONTREAL GAZETTE Stay up to date on this topic Quebec is undergoing a profound demographic shift.
Opinion: Quebec’s aging population demands move to new model of brain care
Advertisement oop Skip to Content As our population ages, the incidence of Alzheimer’s, dementia, Parkinson’s and other neurological conditions is rising sharply. Quebecers should be able to rely on neurological care that is accessible, integrated and built around patients’ needs.
Opinion: Quebec’s aging population demands move to new model of brain care
Advertisement oop Skip to Content As our population ages, the incidence of Alzheimer’s, dementia, Parkinson’s and other neurological conditions is rising sharply. Quebecers should be able to rely on neurological care that is accessible, integrated and built around patients’ needs.
Opinion: Quebec’s aging population demands move to new model of brain care
As our population ages, the incidence of Alzheimer’s, dementia, Parkinson’s and other neurological conditions is rising sharply. Quebecers should be able to rely on neurological care that is accessible, integrated and built around patients’ needs.
Opinion: Quebec’s aging population demands move to new model of brain care
Advertisement oop Skip to Content As our population ages, the incidence of Alzheimer’s, dementia, Parkinson’s and other neurological conditions is rising sharply. Quebecers should be able to rely on neurological care that is accessible, integrated and built around patients’ needs.
Opinion: Quebec’s aging population demands move to new model of brain care
Advertisement oop Skip to Content As our population ages, the incidence of Alzheimer’s, dementia, Parkinson’s and other neurological conditions is rising sharply. Quebecers should be able to rely on neurological care that is accessible, integrated and built around patients’ needs.
Logging Simscape variables like Simulink Signals
Did you know that starting in R2024a, it is possible to log Simscape variables like if they were Simulink signals? Let's see how that works. The Problem Here is a pattern I often see in Simscape models. To log variables from Simscape blocks, users add sensor blocks and PS-Simulink Converter, and then log the output Simulink signal. mdl = 'CavitationInTwoPhaseFluid'; After simulating, you can access all logged signals in the logsout.
Model-Based Systems Engineering and Agentic AI
Today I am happy to welcome Sarah Dagen from MathWorks Consulting Services to talk about her experience with coding agents for Model-Based Systems Engineering. . Like many of you, I’ve been exploring agentic AI and coding agents. I’ve also been thinking about Systems Engineering, so I decided to try building up a model-based systems engineering (MBSE) methodology-based workflow with an AI assistant. If you’re skeptical about all of this, don’t worry: you are not alone.
What’s New in R2026a?
MATLAB R2026a is available, let's see what's new in the Simulink world. New Context Menu This one cannot be missed! We decided to modernize our right-click menu. Here is what it looks like when you right-click on a Constant block: I have been using this new menu for many months now and it works well for me. It takes a little bit of getting used to, but overall, I think this is a good evolution. See the for more details.
Simulink Agentic Toolkit
After the MATLAB Agentic Toolkit debuted last week, we are very happy to release the Simulink Agentic Toolkit on GitHub today. Setup To get started, go through the README.md and GETTING_STARTED.md. You will see that it's as simple as cloning the repository, launching your AI coding agent ((Claude Code,GitHub® Copilot, Cursor, OpenAI® Codex, Sourcegraph Amp, Gemini™ CLI) in the repo, and ask "Set up the Simulink Agentic Toolkit".
My Repository of AI Skills for Simulink
Last week, MathWorks released the MATLAB Agentic Toolkit. This toolkit packages tools and skills ready to use in your favorite agentic coding tool (Claude Code,GitHub® Copilot, Cursor, OpenAI® Codex, Sourcegraph Amp, Gemini™ CLI). It provides guidance for the AI coding agent to do things like build apps, create tests, create live scripts, through the MATLAB MCP server.
Single-cell expression QTL analyses of the human cerebellum reveal vulnerability of oligodendrocytes in essential tremor
Abstract Essential tremor, a movement disorder characterized by an upper-limb postural and action tremor, is among the most common neurological disorders, affecting 1% of the population worldwide. Despite strong evidence for genetic factors driving the etiology of essential tremor, the underlying pathophysiology remains poorly understood.
Simulink and Simscape modeling using Claude Code and the MATLAB MCP Server
This week, I am going one step further in my exploration of AI agents and how they can help Simulink workflows. In previous posts, I went through the basics of connecting GitHub Copilot with the MATLAB MCP Server, and created a set of basic coding rules to generate MATLAB code simulating Simulink models.
Understanding the C/C++ Code Generated from a Simulink model
One of the key benefits of Simulink is that you can generate C/C++ code from the model using Simulink Coder and Embedded Coder. However, I have to admit, looking at the code generated from Simulink for the first time can be intimidating. In this post, I will try to demystify that a little bit. The Challenge The first time you generate code from a Simulink model, you notice that a folder gets created with multiple files in it.
MATLAB AI Coding Standards for Simulating Simulink Models
In my previous post, I went through the basics of using GitHub Copilot and the MATLAB MCP Server to generate MATLAB code that can simulate a Simulink.
Simulating a Simulink Model through GitHub Copilot and the MATLAB MCP Server
Today I am continuing my exploration in the world of AI coding assistants and how they can help with Simulink. The topic for this post: The MATLAB MCP Server. MATLAB MCP Server MathWorks recently released the first version of the MATLAB MCP Core Server on GitHub. If you're not familiar with the Model Context Protocol (MCP), you might want to give a quick look at the Wikipedia page: Model Context Protocol - Wikipedia.
My Personal Simulink AI Assistant
In my previous post, I introduced MATLAB Copilot and the Simulink Copilot Beta. Today, I continue my exploration into the world of AI assistants and how they can help in a Simulink context. What should a Simulink AI Coding Assistant do? And How? Since I started using AI coding assistants, I keep thinking: What do I want an AI assistant to do for me in a Simulink context?
A Copilot for Simulink!
I recently decided to investigate different AI coding assistant technologies and see how they can help with Simulink. This led me into a series of blog posts that I plan to publish in the next few days and weeks.
How do you Inspect Logged Signals?
I receive and debug Simulink models all day every day. This means that I often need to log many signals and inspect them to understand what the model is doing. For that, I like using the Simulation Data Inspector in combination with the in-canvas logging badges. I decided to share that today because this is not the default behavior, and I don't want you to miss it. Here is what it looks like. Simply clicking the logging badge controls the signal displayed in the Simulation Data Inspector.
Extracting Timetables… Simulink style
Today I want to share a simple tip to interact with data logged from a Simulink model The Problem Let's take this simple model that logs 3 signals with different sample times: After simulating, it is possible to use extractTimetable to create a single timetable with all the logged signals: TT = out.logsout.extractTimetable TT = 11×3 timetable TimesineTs1sineTs2sineTs3 1 0 sec 0 0 0 2 1 sec 0.0628 NaN NaN 3 2 sec 0.1253 0.1253 NaN 4 3 sec 0.1874 NaN 0.1874 5 4 sec 0.2487 0.2487 NaN 6 5 sec...
Record and Playback Blocks
Today I want to talk about two relatively new blocks: Record and Playback. Record Block Let's start with this simple example where I connect two signals to the Record block: mdl = 'MassSpringDamper'; When you double-click on the block, the first thing you will notice is that the Record block gives you the possibility to visualize the signals connected to it with a look and feel similar to the Simulation Data Inspector, but embedded in the Simulink canvas.
Merging Simulink Models Automatically in Git
This post is targeted at users developing Simulink models under Git source control, but who are not necessarily using the MATLAB source control integration. I personally work in MATLAB and Simulink all day, so the MATLAB source control integration usually does the job for me. However, I realize that many Simulink users deal with projects including multiple software and artifacts, and prefer to use Git command-line or a dedicated Git client to manage all that.
How to programmatically configure a Simulink simulation?
Here is another frequently viewed MATLAB Answers post: While this question asks specifically about stop time and solver step size, I think this can be generalized to this question: How to find the programmatic equivalent of a block or model setting in Simulink? My answer is: Use What's This?
Organizing Simulink files and folders in a project
Today I am happy to welcome Sarah Dagen from MathWorks Consulting Services to talk about project organization. I recently received this email from a friend: I'm helping my friends get started with Simulink and I wondered if there is a recommended folder structure for Simulink projects. I found stuff online for MATLAB toolboxes (see this for example), but nothing for Simulink.
What’s New in Simulink R2025a!
For a first post about R2025a, I decided to highlight 3 enhancements that will help speed up your Simulink workflows... and since it helped me writing this post, a quick mention of the new MATLAB Copilot A few years ago, I published this post: Getting the most out of Rapid Accelerator mode – Version R2023b » Guy on Simulink - MATLAB & Simulink. In R2025a, we made this workflow simpler and more efficient.
Visualizing the number of blocks in a Simulink model?
I was recently discussing different ways to visualize the content of a Simulink model with colleagues. Working in technical support, I receive models from users every day and it's always useful to quickly get a feeling of "what's in that model?". At some point during the discussion, my colleague Reid Spence said "This would probably be useful to visualize the number of blocks in different subsystems using something like a Sankey diagram".
Using Test Points to log Signals for Software-In-The-Loop Simulation
This week's post is a suggestion from Raymond Estrada from MATLAB and Simulink Consulting Services. Raymond reached out recently to share a tip for verifying and validating logged signals in the code generated from Simulink. The Problem It's a common practice in the verification and validation world to run simulations and look at the value of outputs and (sometimes) intermediate signals, and compare those to expected values.
The Basics of a Control Loop in Simulink
This week I received a series of interesting questions on the basics of putting together a simulation of a control loop involving a Simscape continuous plant and a discrete controller. The questions are summarized in this image: Here are my answers to those questions. Discrete Controller I recommend implementing the controller in a separate model file and bringing it in the simulation using the model block.
Reply to: Insufficient evidence for natural selection associated with the Black Death - Nature
replying to: A. R. Barton et al. Nature https://doi.org/10.1038/s41586-024-08496-5 (2023). We thank Barton et al.1 for their careful consideration of our study2. They raised important concerns, which led them to conclude that our dataset was underpowered to be informative about human evolution during the Black Death. We agree that small sample sizes are an inherent limitation of ancient DNA studies.
An observational study of pleiotropy and penetrance of amyotrophic lateral sclerosis associated with CAG-repeat expansion of ATXN2 - European Journal of Human Genetics Original
Abstract Spinocerebellar ataxia type 2 (SCA2) and amyotrophic lateral sclerosis (ALS) are both associated with a CAG-repeat expansion in ATXN2 and with TDP-43-positive neuronal cytoplasmic inclusions. The two disorders have been viewed as distinct entities, where an intermediate length expansion of 31-33 CAG-repeats is associated with sporadic ALS and a full length expansion of ≥34 CAG-repeats is associated with SCA2.
Author Correction: Evolution of immune genes is associated with the Black Death - Nature
Correction to: Nature https://doi.org/10.1038/s41586-022-05349-x Published online 19 October 2022 In the version of the article initially published, the genotype likelihood-based allele frequency estimator we used resulted in a biased estimate of allele frequencies, particularly among sites with low coverage data. We have now corrected this by employing a maximum likelihood-based estimator, which offers an unbiased estimate of allele frequencies.
The Most Impactful Recent Features in Simulink
I have been recently asked this question: What are the top 10 most impactful and recent features for Simulink and Model-Based Design? It's a tricky question because different workflows are impacted by different features. Something life-changing for one user can go unnoticed by someone else. Also, the meaning of "recent" depends a lot on how often you update to new versions. I have been supporting Simulink users and writing this blog for more than 15 years.
Capabilities for Modeling Dynamic Systems and Designing Feedback Control Systems in MATLAB and Simulink
In today's post, I want to share a few links. I shared those with individual users recently, and every time the response I get is "Wow, those are super useful, I wish I knew about them earlier" The following resources will give you an overview of everything available to model and control systems in MATLAB and Simulink, so you can pick the right tool for your needs. Capabilities for Modeling Dynamic Systems This first page is about modeling dynamic systems.
How to correct errors in port width or dimension in Simulink?
Let's continue our tour of the most viewed Simulink-related MATLAB Answers. This week, we look at: While this error mentions dimensions, the same principles and techniques to debug this error apply also to other properties like data types and sample times. The Problem To begin, let's recreate a model similar to the one in the MATLAB Answers post: mdl = "PropagationIssue"; out = sim(mdl,"CaptureErrors","on"); out.ErrorMessage ans = 'Error due to multiple causes.
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Guy
Contact Guy, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack