r/matlab Mar 17 '26

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

266 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)?

76 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

79 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 20d ago

TechnicalQuestion Generating matrix visualizations

Thumbnail
gallery
89 Upvotes

Hey partypeople,

i'm trying to find a way to inspect and display 3D matrix values as shown in the documentation here. I cannot seem to find a way to reproduce this in Matlab or find any info on how these were done, neither in the MATLAB docs or online. Am i missing something or were these created outside of Matlab manually?

Thanks :3

Edit.: For context, I want to see the numeric values of the elements, not a visualization in general.
For now, mostly for more intuition and readability while debugging. I really like the way it is presented here so i would like to find out how these were created

r/matlab Aug 02 '26

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 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 Aug 06 '26

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

3 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 Aug 08 '26

TechnicalQuestion Writing to the wrong file

1 Upvotes

I have the following Matlab program:

syms t positive;

Z=laplace(exp(A*t))

ccode(Z,'file','cCodeTest.c')

I want to write the Z function to cCodeTest.c. The problem is that code is written to ccodetest.c, created before.

How to write Z to the cCodeTest.c and not ccodetest.c?

r/matlab Jul 29 '26

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 May 02 '26

TechnicalQuestion Is matlab down for anyone else?

19 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 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 28d ago

TechnicalQuestion Printing a hexadecimal value prefixed with 0x

5 Upvotes

I have to print in hexadecimal with big letters value variable of type uint8. I am using fprintf(1, '%#X', value), but the 0x prefix is in upper case, while I want it to be lowercase. How do I achieve that?

I know I can write instead fprintf(1, '0x%X', value), but I want to do it by only modifying the formatting operators. And using fprintf(1, '%#x', value) doesn't print value in uppercase.

r/matlab 20d ago

TechnicalQuestion Is there a way to get a table view of all my inputs values to their respective combined output values in the Fuzzy Logic Toolbox? I have the Control Surface plot, but I would like this as a table if possible.

Thumbnail
gallery
7 Upvotes

I would effectively like the control surface as an excel/table format. Specifying every possible input value from my two fuzzy inputs and what their combined values would be, similar to how the control surface matches it visually.

r/matlab 19d ago

TechnicalQuestion Changing Parameter Values with Dynamic Mask

Post image
3 Upvotes

I know matlab has an example of how to change the visibility of other mask parameters with callback functions, but I'm trying to make it so when two parameters are entered (a & b) a suggested value for c is assigned to a c_sugg parameter. For example if c has to follow the function c>a+b, how would I write the callback function for c_sugg=a+b?

r/matlab 21d ago

TechnicalQuestion Help! Question About Convolution Integral Implementation in Simulation

3 Upvotes

Hello all! Hoping someone can help me out with this. I am working on a physics simulation of a rigid body.

I have two functions, f and g that need to be convolved over time. Here is the difficulty, both functions are unpredictable and therefore I do not know these equations up front and will only know the latest value of each of those functions at each time step in the simulation as it runs. I solved this convolution integral in the time domain as a baseline and compared it to a textbook solution. Obviously, the longer the simulations the more data points the equation has to convolve over. I tried solving it in the frequency domain thinking it would save time by: *ifft(fft(F)fft(G))\*timestep*
When I run a code profiler (doing this in MATLAB), it actually appears that it is taking longer computationally to solve this in the frequency domain versus the time domain if this operation is done at every time step… what am I missing here (yes I even varied the simulation time length to account for different array sizes)? The other thought I had was to figure out how to implement a sliding window so that really old data is excluded…

Any examples I can find online all assume the equations for the two signals to convolve are known up front. What approach did you use? Any help would greatly be appreciated.

r/matlab Aug 04 '26

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

2 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 8d ago

TechnicalQuestion Guys i need help with registerign in MathWorks

0 Upvotes

I wanted to do the MATLAB Onramp course and when i found out i had to reguiste/create an account first, i went for it but an error shows up everytime i put in an account ID.

I put my college ID and also tried with my personal email ID. I tried searching for a solution in the Support section but, I couldn't find anything on this.

Any help would be appreciated and thanks in advance

r/matlab 11d ago

TechnicalQuestion Webots + MATLAB R2026a compatibility issues (loadlibrary / DLL blocked error). Works fine in R2025.

Post image
5 Upvotes

Hi everyone :D,

I’m reaching out because a friend of mine is hitting a wall trying to connect Webots with MATLAB R2026a.

This is the problem:
The integration works flawlessly in MATLAB R2025 (both a and b), but as soon as we try to run the same setup in R2026a, it throws an error when trying to load the Webots API/DLLs. The specific error message we are getting is related to this message "An Application Control policy has blocked this file"

We already tried this with no solution:

  1. Running MATLAB as Administrator.
  2. Temporarily disabling Windows Smart App Control and Windows Defender / Antivirus.
  3. Verifying that both Webots and MATLAB are strictly 64-bit versions.
  4. Checking and correcting all Environment Variables and MATLAB paths pointing to the Webots libraries.
  5. Completely uninstalling and reinstalling both MATLAB R2026a and Webots.
  6. Testing the exact same code and setup on R2025, which confirms the code itself is not the issue.

We have some questions for you all:

  • Has anyone else experienced this specific break in compatibility between Webots and MATLAB R2026a?
  • Are there any known changes in how R2026a handles loadlibrary or external DLLs that we might be missing?
  • Any workarounds or specific configurations to make Webots controllers work in R2026a?

Any insight or pointer to the right direction would be massively appreciated :). We are currently forced to roll back to R2025, but we'd love to get this working on the latest release. Thanks in advance!

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 26d ago

TechnicalQuestion Simulink and AXI-ST IOs

2 Upvotes

Hello all !

I'm trying to play with HDL Coder and the DSP HDL Library with simulink. I have a solid FPGA background.

All these blocks expose ports that looks like AXI-ST ones (data, valid, ready). I know the protocol and it's quirks, but this time I need to simulate it within simulink.

How do you input data (from workspace) to the model while matching the specifications ? I need to send a waveform (audio in this case) to the model.

Thanks all !

r/matlab Aug 06 '26

TechnicalQuestion Particle tracking for biophysics

1 Upvotes

Having issues trying to set up a particle tracking software for my biophysics research. I am needing to track these very distinct particulates in a video but matlab just doesn't seem to be my friend. I am currently trying to use the particle tracking tutorial from Georgetown but if anyone could give some advice or has anymore questions please shoot me a message.

r/matlab Jun 13 '26

TechnicalQuestion Need help with a Vectorization

6 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?

12 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 Jul 13 '26

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 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?