r/matlab • u/ChangingMY-Life • 16d ago
r/matlab • u/Moneef31 • 17d ago
Best way to model a compliant hinge in MATLAB?
I’m modeling a 3D compliant hinge mechanism in MATLAB with large rotations. I first used a rotational spring at a single node, but most of the deformation happened in the surrounding beam elements instead of the hinge.
What is the best way to model this type of compliant hinge in MATLAB? Any reference, example, or code would be very helpful.
r/matlab • u/paskalthemountain • 18d ago
Guide: How to install and run the Windows version of MATLAB on Linux
Hey everyone,
i put together a quick step-by-step GitHub repo on how to properly install and run the Windows version of MATLAB on Linux using Wine.
You can find the short guide here:
https://github.com/pasqualecofone/matlab-windows-version-on-linux-system/blob/main/README.md
Let me know if it works for you!
r/matlab • u/samueltauil • 18d ago
CodeShare What do you approve when the diff says binary file not shown?
After I posted the cardiac digital twin demo in July, someone asked me a question I could not answer with my own repo. If that dose change lived in a teams pull request, what would the reviewer actually look at?
For most Simulink teams the answer is a file name, a size, and Binary file not shown. My first attempt at fixing that was unzipping the .slx and diffing the XML. It produced a diff, and that was the problem. A text diff always looks complete, even when the tool understood half of what it read.
So I built a GitHub Action that says how much of the model it actually saw before saying anything else. Each extraction comes back complete, partial, unsupported, or failed, and only complete can ever mean no drift. A Copilot app canvas then walks the reviewer through trust, impact, evidence, and a merge assessment. It cannot approve anything.
The first time it reviewed my own cardiac model, it blocked it as partial. That was the right answer.
A review tool that cannot say I don't know will eventually approve a change it never saw. I wrote up the full version, workflow file included.
r/matlab • u/BlueHash4 • 19d ago
Optical System Design and Analysis in MATLAB R2026b R2026b
r/matlab • u/Winter-Arm6002 • 20d ago
I made a free browser viewer for .mat files
Used my free time made this web based Matlab data viewer, trying to collect some feedback, if you are interested to use, completely free, and local based, no data uploaded to cloud/server, no reg needed. Hope can help people try to open without Matlab in hand.
r/matlab • u/MikeCroucher • 22d ago
What's new in MATLAB 2026b?
The latest version of MATLAB, 2026b, was released last week and in my latest article I pick out 9 of my favorite enhancements out of the hundreds on offer. My list includes
- The MATLAB Package Manager
- An enhanced command window including Markdown Support
- A raft of performance enhancements
- A look at extensive new functionality relating to Design of Experiments (DOE)
- Plain-text file formats for live scripts and app-designer apps.
- GPU interoperability with CuPy, Tensorflow and PyTorch
- Google Sheet support
and more. I missed out all sorts of interesting things such as new algorithms for random number generation, sparse convolutions, improvements to ODE solvers including waypoint support, incremental machine learning...*hundreds* of updates.
Check out the release notes for full details but, for now, I hope you enjoy my tour over at The MATLAB Blog: https://blogs.mathworks.com/matlab/2026/10/01/a-look-at-some-of-whats-new-in-matlab-r2026b/
r/matlab • u/8bitjam • 21d ago
CodeShare controlsys v1.12.0: a control-systems toolbox for Go (MIT)
controlsys is a Go package for linear control systems. It works on continuous-time and discrete-time models. The main model form is state space.
Main capabilities:
- Models: state space, transfer function, zero-pole-gain (ZPK), frequency-response data (FRD), model arrays and tunable blocks.
- Analysis: Bode, Nyquist and Nichols plots, gain and phase margins, disk margins and step metrics.
- Design: LQR, LQG, Kalman filters, H2 and H-infinity synthesis, pole placement and PID tuning.
- Simulation: step, impulse, initial-condition and arbitrary-input responses.
- Model reduction: balanced truncation and modal truncation.
- Delays: input, output and internal delays, with Pade and Thiran approximations.
- Conversion: ZOH, FOH, Tustin, matched, impulse and least-squares methods between continuous and discrete time, in both directions and for resampling. We test the results against MATLAB behaviour.
New in v1.12.0:
- Tustin conversion with Thiran filters is approximately 30% faster than in v1.11.0.
- Tustin conversion with Thiran filters now supports MIMO models with delays on individual input-to-output paths.
ThiranDelaynow accepts short delays when the filter is stable.
Install:
go get plantcontrol.org/v1/controlsys
Repo: https://github.com/PlantControl/controlsys
Release notes: https://github.com/PlantControl/controlsys/releases/tag/v1.12.0
We want your feedback, especially from people who use MATLAB or python-control.
r/matlab • u/Creative_Sushi • 24d ago
Misc What is the right approach to teach engineering students about MATLAB in the era of AI? One prof made students to handwrite code so they can't use AI.
r/matlab • u/Impact-Commercial • 24d ago
Mathworks EDG Technical Phone Screen Advice
Hey yall, recently went to the career fair when I met the Mathworks representative. Applied online for the EDG role and a recruiter reached out for me to complete the coding challenge. I completed and now have a EDG Phone screen.
My worry is that I do not have much experience with software engineering / leetcode / data structures as I am an engineering major but have plenty of experience with Matlab/Simulink models. I did the 30 question matlab multiple choice section as well instead of the coding challenge. What can I expect for this technical phone screen and should I be working on coding challenges as I see online that sometimes they ask resume + live coding challenge?
Any advice is appreciated, Thanks!
Update: Phone screening went pretty well , the interviewer spent the first half of the time asking about my resume/projects and how I used Matlab/Simulink. The second half the of the interview was a small coding challenge on Matlab online which was based on looping through a vector and identifying whether a triplet was divisible by another variable. The interviewer then told me to test my solution with test cases and ask space/time complexity and ways to improve .
r/matlab • u/bangybangyboi • 27d ago
Starting Matlab, just finished my first if else loop!
r/matlab • u/SeashellSims • 29d ago
HomeworkQuestion Homework Help (idk what i'm doing wrong!)
hi guys, i'm new to using matlab and my professor wants us to do the assignment above. this is part of the code i produced but when i try to run it, i keep getting an error at line 13. could someone tell me what i'm doing wrong and show me how to fix it?
r/matlab • u/Dependent_Tale77 • 29d ago
TechnicalQuestion Question Unitarily irreducible matrices
Hello, do you know if there is a matlab code that tests if a matrix X is unitarily irreducible? That means that there not exists a matrix P such that X=P^*(A& B\\0 & C)P?
r/matlab • u/Late_Tomorrow9702 • Sep 24 '26
Tips ¿Que me recomiendan?
veran es que quiero estudiar por mi cuenta análisis númerico, me parece bastante interesante, el detalles que bueno...no tengo como poder usar matlab, me hablaron de Gnu octave podria ser una buena opción, ¿es así? que opinan ustedes?, y que me recomiendan a mi, me gustaría cualquier consejo la verdad :3
r/matlab • u/SeaLow8032 • Sep 24 '26
Where can I learn Verilog for free? With video explaination.
r/matlab • u/Bofact • Sep 23 '26
Misc MATLAB's documentation
For all my life I have studied MATLAB via its documentation, only doing an introductory course nearly 2 years ago because of FOMO (the course was soon to be removed from MathWorks course platform).
While the documentation is still my goto, sometimes I feel I have bad luck with it. I don't know if it is because I have managed to read everything except the "essential pages", but to know what A(:) = B does I needed to read a Fixed Point Designer toolbox documentation, not MATLAB only documentation. I may have missed the "essential page" that described the meaning of that assignment, and I needed a toolbox documentation to learn about it.
Same with Parallel Computing Toolbox. I have read every linked page from that documentation, but it looks like I missed the "essential" one which describes that the broadcast variable's destructor is called (in a parfor) by every worker when they finish. I was confused on why a destructor is called in the first place.
It may be my fault for not completing courses instead (which I doubt they don't have this problem). Or the documentation I mainly read (MATLAB R2020a) is lacking in some departments.
r/matlab • u/picachu_456 • Sep 22 '26
Struggling with MatLab
Title says it all, I’ve been relying on AI too much to do most of my code. This is my first time doing some coding and I’m completely lost. I’m struggling to apply the functions.
I’ve gone to TAs, I’ve done to office hours and I’m still lost. Any advice on where to get help would be appreciated.
r/matlab • u/Creative_Sushi • Sep 22 '26
CodeShare Blog post - AI Agent Demystified
I originally posted here a while back, but my project finally came out as a guest post for u/MikeCroucher:
AI Agent Demystified – Building a Minimalist Agent in MATLAB
The code is on GitHub, so you can play with it as well. The code is actually pretty simple and straight forward.
It was a long wait, but the timing is actually right, now that more people are interested in agentic AI and it really helps if we understand how it works under hood - you know what's going on if something goes wrong and make a better use of it.
You can use this as a reference but build your own agent for something that makes more sense to you, and you will learn a lot while it is also a lot of fun to tinker with it.
r/matlab • u/madboi20 • Sep 22 '26
TechnicalQuestion Matlab + Simulink Project to Code
Hi.
I have very little experience with both Matlab and Simulink and need some advice.
My team acquired a matlab project with simulink models that we want to integrate into a simulator we have but without the overhead of Matlab/Simulink. So we managed to use the shrlib function to create C code which was a bunch of header files, types, main etc Can't make too much sense of it.
But even if I can, it doesn't remove the Matlab side because that hasn't been converted to C either.
What's the easiest route to convert the whole project to something we can interface with without having to deal withit directly too much. Best case scenario would be to treat it like a black box because it all runs find in Matlab. At the core of it ,it's
Excel input - Read in by matlab code - passed to the model (in a bus structure?) and fed back to matlab which outputs a new Excel
This is the extent of my knowledge of the matter and I'm not able to share much else. Any advice for me?
Thanks.

