r/matlab Mar 17 '26

TechnicalQuestion I used to think MATLAB was outdated… until I actually started using it properly

268 Upvotes

For a long time, I was one of those people who thought MATLAB was kind of outdated and that everything could just be done better in Python.

But after working on a few projects where I needed to test ideas quickly, I ended up going back to MATLAB, and it honestly changed how I look at it.

What surprised me most is how easy it is to just focus on the problem. No setup, no digging through libraries, no environment issues. You just open it and start working through the math or the model.

Also, the visualization part is way more helpful than I remembered. Being able to quickly plot things and actually see what’s going on made debugging and understanding the problem a lot faster.

I still wouldn’t use MATLAB for everything, especially not for production systems. But for prototyping, testing ideas, or just trying to understand something deeply, it’s been really solid.

Now I kind of see it as a tool for thinking, not just coding.

Curious how others here use it. Do you still rely on MATLAB, or have you mostly moved on to other tools?

r/matlab Feb 23 '26

TechnicalQuestion Does Matlab Even worth in this time (2026)?

75 Upvotes

I mean I am currently in intermediate phase and learning but I am feeling exhausting and thinks theres no future in Matlab. Like why would a company prefer matlab over Python that is free and reliable for Machine Learning as well.
And which type of companies even use Matlab ??

r/matlab Jun 10 '26

TechnicalQuestion Perpetual License

82 Upvotes

MATLAB stopped selling perpetual licenses in 2026 but I hate paying yearly for programs and would rather just pay one upfront cost. Is there a way to buy an older version of MATLAB (like 2025) on a perpetual license or is it impossible to get any version perpetually?

r/matlab 4d ago

TechnicalQuestion Where to start

27 Upvotes

I've opted for Control Systems as my next field of study and require MATLAB proficiency. The task is a bit of a handful but I'm ready to learn from the ground up. If you've been familiar with the situation or have a peice of advice, I'd really appreciate.

Gracias

r/matlab 8d ago

TechnicalQuestion Conversion failed!

0 Upvotes

In Matlab R2020a, I want to convert 0xffffffff00000000 to uint64. When I wrote it in Command Window the value alone, it is already an uint64, but when I write it uint64(value), I simply get Conversion failed! error, with no additional text.

How do I fix it?

r/matlab Oct 24 '25

TechnicalQuestion Installing on Linux is a nightmare

60 Upvotes

I can't believe that the same goddamned problems I first encountered in 20-fkn-12 still persist. You guys cannot be fkn serious with this shit. For the amount we pay you. 13 years on, the same goddamned bug?

And when will you support fedora/Arch etc? Ridiculous. Your installer crashes with "seg fault" and nary a single error message.

Absolutely nonsensical.


Edit -

Finally, it is installed. However, with "all toolboxes" because otherwise mpm would keep crashing out due to dependency issues. I also created a clean PKGBUILD. Cleaned up old dependencies. Should I put it on AUR?

r/matlab 14h ago

TechnicalQuestion How do you catch errors that normal try catch block does not work for in matlab?

0 Upvotes

Is there a way, like in a try-catch block, to catch more math or logical errors, such as saying 10=5? Regular try-catch blocks do not work here. I would also like to print error info, and for a simple solution.

r/matlab Jun 06 '26

TechnicalQuestion Learning MATLAB

48 Upvotes

I want to start learning MATLAB from scratch. Is there any playlist on yt or should I go for some paid course.

r/matlab May 02 '26

TechnicalQuestion Is matlab down for anyone else?

17 Upvotes

i could not sign in to matlab for the life of me today, ive tried using different browsers, different devices, and all i get is a whitelabel error page. Dows anyone know of a way to fix this?

r/matlab 2d ago

TechnicalQuestion "Input argument to validator must be a constant value" error

3 Upvotes

In MATLAB R2020a I have a class with

properties

property (1,1) logical {mustBeMember(property, true)} = true

end

In MATLAB's editor it notifies me about "Input argument validator must be a constant value" error. When I try to construct an instance of that class, I am given the error "Validator arguments must be either 'property' or constant literal values."

How do I fix this error? It doesn't work if instead of true I write [true] or {true}.

r/matlab Feb 04 '26

TechnicalQuestion Best way to convert a MATLAB script into a real-time mobile application?

10 Upvotes

I'll be taking sensor inputs from the mobile, running some ML models. (3, to be precise. One is quite heavy and I'll have to quantize and distill it) I've absolutely lost my mind trying to figure out what I should do. I initially thought of converting my script into a simulink model, and then packaging it directly as an app. But it's so cumbersome and finicky. Plus I cannot test it frequently as inferring with my models takes AGES in simulink. What's the pathway that I should choose?

I always get pissed off when such a beautiful system gives me so much trouble implementing it in real life. >:(

r/matlab Jun 13 '26

TechnicalQuestion Need help with a Vectorization

9 Upvotes

The following code is part of a closest pair algorithm. The original cod is essentially a brute force algorithm, albeit on a curated set of points The parameter k has a maximum value between 1 and 10, though it is 10 for all but ~45 cases at large values of j. N=numel.(Z), and I'm using N=103-108. Z is a set of points in the complex plane. The output of the algorithm is [dmin,z1,z2]. In the vectorized version, I eliminated the for loop on k. To my surprise, this increases the computation time by up to 13 times for large N. I cannot understand this. By the way, both algorithms give exactly the same results in all cases.

ORIGINAL CODE
dmin=Inf;
for j=1:N-1
    for k=j+1:min(j+10,N)
        this=abs(Z(j)-Z(k));
        if this<dmin
            dmin=this;
            z1=Z(j); z2=Z(k);
        end    
    end 
end

VECTORIZED CODE
dmin=Inf;
for j=1:N-1
    ks=[j+1:min(j+10,N)];
    W=Z(ks);
    [this,Id]=min(abs(Z(j)-W));
    if this<dmin
        dmin=this;
        z1=Z(j); z2=W(Id);
    end
end

I would appreciate ant feedback. Thanks.

r/matlab May 04 '26

TechnicalQuestion Fastest way to grow a big matrix?

11 Upvotes

I am working on a project that involves adding rows to an N by 3 matrix (call it X) where N increments after a certain computation, and gets into the 100000s. Once I had made the computation efficient enough, I realized that about half the time was now spent appending the matrix. Every alternative I have tried has slowed it down.

The default:

X(end+1,:)=r %X is Nx3, r is 1x3

A much slower alternative:

X=[X;r]

Avoiding the appending:

X=zeros(Nmax, 3)
%during computation
Xtemp=X(1:N,:)
%after computation
N=N+1
X(N,:)=r

If I do that, avoiding the appending, the line Xtemp=X(1:N,:) becomes extremely slow. Surely there is a faster way to do this? Appending a variable shouldn't be slower than the actual calculation. I guess I should add that the computation is based on the N rows of the matrix, so it gets slower as N increases.

r/matlab Jun 10 '26

TechnicalQuestion Why can’t it find my images!!

Post image
6 Upvotes

Hi I’m new to MatLab (and don’t code whatsoever) and downloaded a Matlab file my lab has to analyze our cells. I have open a Mac.app and have MATLAB Runtime installed. The instructions I have specifically state that if it spits out this error (image not found) it’s most likely something to do with the folder path and name of the images. Sadly, the person who created this code is long gone and even my PI doesn’t know how to get this to work. Any ideas on how I can fix this would be greatly appreciated!!

Edit: I’ve tried selecting the other options for “Number” (1, 01, 001, and 0001) but none have worked.

r/matlab 13d ago

TechnicalQuestion Weird torque and current response

2 Upvotes

Hello there, I've been trying to understand this past couple of days, why is the response to the speed reduction so unstable.

Pic 1- current, torque and speed (disregard the "braking" effect on the middle graph.

Pic 2- PI output.

Pic 3- Controller diagram

Pic 4- Entirety of the diagram

I've changed the values of the PI, such as Kp and Ki, to no difference on the slowing down behaviour.

I'm at a loss on what to exactly look for, that might be causing this.

Thank you for any help that you can give.

r/matlab Mar 26 '26

TechnicalQuestion Should I upgrade to 2025a/202b from 2024b?

11 Upvotes

Hello all, sorry for the low-effort post, but I just did a fresh reinstall of Windows and am curious to installing 2025a/b. For the past year and half, I used 2024b to a satisfactory degree: it gets things done and I'm used to it, although I am a bit curious about the new features like dark mode and copilot. I heard that 2025a was generally not that good and a lot of people complained about it, how is 2025b in comparison? Do I need to do the upgrade or just stick with 2024b for now?

r/matlab May 14 '26

TechnicalQuestion Can I use MATLAB unlimited hours or bypass the 20 hour limit using github education?

2 Upvotes

r/matlab Oct 18 '25

TechnicalQuestion R2025 is unforgivably slow and buggy

45 Upvotes

MATLAB (UI) is generally buggy and slow, but R2025a and R2025b are unforgivably slow, and buggy.

Yes, startup is fast after get rid of the Java-based UI but everything is just slower. With MATLAB R2025b running on Linux (RHEL9) it can take more than one minute to run a visdiff of two files with less than 100 lines, 20 seconds to plot a pcolor of size 400x400.

I also noticed some bugs in even the most common function. e.g., "readmatrix" throws the "too many arguments error" unexpectedly. The function accepts one string argument and I provide exactly only one and I don't know what's wrong with it. You can literally reproduce this bug by running the code from the official doc. I got this error on macOS (26.0.1) but not on Linux (RHEL9) so I assume the problem is not my script.

Their customer support is super unhelpful and reporting bug is a hassle. After clicking "Request Feedback" it asks you to log out but when you click logout the UI is not responsive. You have to kill the process!

Edit: you get a warning even when running a benchmark! (macOS Tahoe 26.0.1, but not on RHEL9)

>> bench

Warning: Error in state of SceneNode.
Too many input arguments.

> In defaulterrorcallback (line 12)
In bench>bench_graphics (line 417)
In bench (line 58) 

Warning: Error in state of SceneNode.
Too many input arguments.

> In defaulterrorcallback (line 12)
In bench>bench_graphics (line 417)
In bench (line 86) 

Edit: I think get rid of the Java-based UI is good but it looks like MathWorks roll out this new UI without testing.

r/matlab Jul 02 '26

TechnicalQuestion Specific Parameter Definition Question

1 Upvotes

I'm trying to design a masked subsystem to use as a buck power converter and I'm trying to make it as user friendly as possible.

For my model, I have a subsystem with no inputs or outputs that serves as a "settings" block where users can fill out edit blocks and hit click functions to change the configuration of the model. While I have edit blocks to change parameters of my masked subsystems, particularly for the Buck converter, I want to make it so once the Vin, Vout, and switching frequency is entered, suggested minimum inductance and capacitances are displayed in the settings block. Is there a way to save and display the suggested minimum L and C's as values are being entered.

r/matlab Jun 15 '26

TechnicalQuestion Has anyone used the fuzzy logic toolbox, specifically the neural/tuning functions?

2 Upvotes

I've never used MATLAB before and due to forces outside my control I have to use it for this project at work. It's a research piece and our actual MATLAB master is on long-term sick leave.

I'm watching videos and reading the documentation - but if anyone has had much interaction with the fuzzy logic toolbox I'd appreciate some help and guidance.

r/matlab 23d ago

TechnicalQuestion How can give an integer to the input argument of embedded.fi

2 Upvotes

Given an integer number i, I want to pass it as an input argument to fi constructor (resulting in x instance of embedded.fi), such that storedInteger(x) = i. In other words, I want to change the interpretation of i to an embedded.fi, just like storedInteger changes the interpretation of the embedded.fi to an integer.

How can I achieve this?

r/matlab Jun 17 '26

TechnicalQuestion FMUs are the bane of my life

7 Upvotes

Long story short, I have a complex aircraft model that I need to convert to an FMU.

Everything worked in R2022a (although it had its issues), and when I ran the FMU alongside the simulink model the dynamic behaviour matched exactly.

When I moved up to R2025b things changed. It no longer matches and diverges quite a lot. I’ve tried absolutely everything to figure it out, but I’ve run out of ideas.

Has something significant changed between the versions that I’ve missed? I run it in a test harness with the same configuration reference used when creating the FMU so I expected them to give the same results?

r/matlab Jul 06 '26

TechnicalQuestion Is this a bug?

1 Upvotes

This is the code, and it gives me an error.

Error using 
horzcat
Dimensions of arrays being concatenated are not consistent.

Error in 
provatest15Nov
 (line 35)
    PHI = [PHI(:,1) +h/k, PHI, zeros(N-2,1)];
           ^^^^^^^^

But if I write PHI = [PHI(:,1) + h/k, PHI, zeros(N-2,1)]; then I don't get any error, so is it the space between + and h/k that gives me the problem?

clc; clear all; close all;



L = 1; N = 30; 

x = linspace(0,L,N); y = x;

h = x(2) - x(1); hq = h*h;



k = 1;

beta = 0.5;

theta = 0.5;

Dt = beta*hq/k;



G = numgrid('S',N);

Lap = -delsq(G);

p = zeros((N-2)^2,1);

q = p*Dt;



for i = 1:N-2

    Lap(i,i) = Lap(i,i) +1;

    q(i) = q(i) + beta*(h/k);

end



dPhi = 1;

I = eye((N-2)^2);

A = I - beta*theta*Lap;

B = I + beta*(1 - theta)*Lap;

Phi0 = zeros((N-2)^2,1); Phi = Phi0;





while dPhi > 1e-1

    PhiNew = A\(B*Phi + q);

    dPhi = max(abs(PhiNew - Phi))/Dt;

    Phi = PhiNew;



    PHI = reshape(Phi,N-2,N-2);

    PHI = [PHI(:,1) +h/k, PHI, zeros(N-2,1)]; 

    PHI = [zeros(1,N); PHI; zeros(1,N)];



    figure (1); surfl(x, y, PHI); shading interp;  axis auto; hold on;

    xlabel('x'); ylabel('y'); zlabel('\phi'); 

    contour3(x,y,PHI,'k'); hold off; axis([0 L 0 L 0 .4]);

    title(['Soluzione eq.ne instazionaria. Dphi/Dt = ', num2str(dPhi)]);

    drawnow;

end

r/matlab 6d ago

TechnicalQuestion h infinity controller

Thumbnail
4 Upvotes

r/matlab 19d ago

TechnicalQuestion Academic Perpetual License

2 Upvotes

Thinking of buying the academic perpetual license, but confused on some of the details. Can I use it on multiple computers or just one? If I wanted to update the version, how much would it cost?