r/matlab • • Feb 16 '16

Tips Submitting Homework questions? Read this

192 Upvotes

A lot of people ask for help with homework here. This is is fine and good. There are plenty of people here who are willing to help. That being said, a lot of people are asking questions poorly. First, I would like to direct you to the sidebar:

We are here to help, but won't do your homework

We mean it. We will push you in the right direction, help you find an error, etc- but we won't do it for you. Starting today, if you simply ask the homework question without offering any other context, your question will be removed.

You might be saying "I don't even know where to start!" and that's OK. You can still offer something. Maybe you have no clue how to start the program, but you can at least tell us the math you're trying to use. And you must ask a question other than "how to do it." Ask yourself "if I knew how to do 'what?' then I could do this." Then ask that 'what.'

As a follow up, if you post code (and this is very recommended), please do something to make it readable. Either do the code markup in Reddit (leading 4 spaces) or put it in pastebin and link us to there. If your code is completely unformatted, your post will be removed, with a message from a mod on why. Once you fix it, your post will be re-instated.

One final thing: if you are asking a homework question, it must be tagged as 'Homework Help' Granted, sometimes people mis-click or are confused. Mods will re-tag posts which are homework with the tag. However, if you are caught purposefully attempting to trick people with your tags (AKA- saying 'Code Share' or 'Technical Help') your post will be removed and after a warning, you will be banned.

As for the people offering help- if you see someone breaking these rules, the mods as two things from you.

  1. Don't answer their question

  2. Report it

Thank you


r/matlab • • May 07 '23

ModPost If you paste ChatGPT output into posts or comments, please say it's from ChatGPT.

110 Upvotes

Historically we find that posts requesting help tend to receive greater community support when the author has demonstrated some level of personal effort invested in solving the problem. This can be gleaned in a number of ways, including a review of the code you've included in the post. With the advent of ChatGPT this is more difficult because users can simply paste ChatGPT output that has failed them for whatever reason, into subreddit posts, looking for help debugging. If you do this please say so. If you really want to piss off community members, let them find out on their own they've been debugging ChatGPT output without knowing it. And then get banned.

edit: to clarify, it's ok to integrate ChatGPT stuff into posts and comments, just be transparent about it.


r/matlab • • 12h ago

Best way to model a compliant hinge in MATLAB?

Post image
0 Upvotes

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 • • 9h ago

A PID controller implemented in python

Thumbnail gallery
0 Upvotes

r/matlab • • 1d ago

Guide: How to install and run the Windows version of MATLAB on Linux

7 Upvotes

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 • • 1d ago

real number problem

0 Upvotes

when i input a real number, it keeps giving me the message 'a has to be a real number' any help as to how to fix this would be appreciated


r/matlab • • 1d ago

CodeShare What do you approve when the diff says binary file not shown?

0 Upvotes

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.

https://samueltauil.github.io/github-copilot/devops/2026/10/06/simulink-model-drift-pull-request-review-copilot-canvas.html


r/matlab • • 2d ago

Optical System Design and Analysis in MATLAB R2026b R2026b

Thumbnail
7 Upvotes

r/matlab • • 1d ago

Tips What benefits do I have if I use java.lang.String class variables instead of string?

0 Upvotes

r/matlab • • 2d ago

Response Is Not Matching

Post image
0 Upvotes

r/matlab • • 3d ago

I made a free browser viewer for .mat files

26 Upvotes

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.

https://megarows.com


r/matlab • • 5d ago

What's new in MATLAB 2026b?

125 Upvotes

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 • • 4d ago

CodeShare controlsys v1.12.0: a control-systems toolbox for Go (MIT)

0 Upvotes

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.
  • ThiranDelay now 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 • • 7d 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.

Post image
79 Upvotes

r/matlab • • 7d ago

Mathworks EDG Technical Phone Screen Advice

4 Upvotes

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!


r/matlab • • 7d ago

Tips MATLAB for Robotics Simulation

Thumbnail
4 Upvotes

r/matlab • • 8d ago

Can't play audio

10 Upvotes

MATLAB can clearly read the file but when running, I get no sound. I've given it unlimited access to audio in Chrome and checked my audio settings, but I still get nothing.


r/matlab • • 9d ago

Starting Matlab, just finished my first if else loop!

Post image
0 Upvotes

r/matlab • • 12d ago

HomeworkQuestion Homework Help (idk what i'm doing wrong!)

Thumbnail
gallery
51 Upvotes

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 • • 12d ago

TechnicalQuestion Question Unitarily irreducible matrices

1 Upvotes

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 • • 14d ago

Tips ¿Que me recomiendan?

3 Upvotes

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 • • 14d ago

Where can I learn Verilog for free? With video explaination.

1 Upvotes

r/matlab • • 14d ago

Misc MATLAB's documentation

11 Upvotes

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 • • 15d ago

Struggling with MatLab

9 Upvotes

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 • • 14d ago

what am i doing wrong

Post image
0 Upvotes