Why do engineers still prefer MATLAB over Python?
Posted by maorfarid@reddit | Python | View on Reddit | 383 comments
I honestly can’t understand why, in 2025, so many engineers still choose MATLAB over Python.
For context, I’m a mechanical engineer by training and an AI researcher, so I spend time in two very different communities with their own preferences and best practices.
I get it - the syntax might feel a bit more convenient at first, but beyond that: Paid vs. open source and free Developed by one company vs. open community Unscalable vs. one of the most popular languages on earth with a massive contributor base Slower vs. much faster performance in many cases
Fellow engineers- I’d really love to hear your thoughts - what are the reasons people still stick with MATLAB?
Let me know what you think.🤔
volkoff1989@reddit
So for background; ive used c/c++, python and matlab and learning rust as we speak. I was taught c/c++ in my first years programming course but the year after it was changed to python.
I was the only person in my bachelors that was a matlab fan. Mostly because python was hype and they never scratched the surface of matlab. Not that i am not a fan of python but my preferance is still matlab.
I think what alot of people gloss over and don’t realise is what matlab can easily do.
Everyone is like syntax this or syntax that or with this python library i can do what matlab can do.
Matlab is all about ease of use. Need parallel computing? Its as easy as opening the parallel computation toolbox clicking some things and -if you have for loops- changing it to parfor and you’re done where it will scale over multiple cores, gpu’s or an entire cluster.
Need my code to run in something embedded? Matlab coder.
Use a usb-oscilloscope but need more storage? Lets connect it to matlab and use my computers ram!
And it can do so much more.
_maniacx_@reddit
Great question! As someone who's worked in both ecosystems, I think the MATLAB persistence comes down to a few things:
Legacy code - Many engineering teams have decades of MATLAB code that "just works." Porting thousands of lines to Python isn't trivial, especially when you factor in specific toolboxes. No one wants to take that on.
Ecosystem completeness - MATLAB's integrated experience (IDE + plotting + numerical libraries + documentation) is still pretty seamless for many engineering workflows, while Python often requires cobbling together matplotlib + numpy + scipy + jupyter + etc.
Institutional lock-in - Universities teach it, companies standardize on it, and switching entire organizations is a massive undertaking. The momentum to switch is huge and therefore less likely.
That said, there's actually a really interesting new project called RunMat [https://runmat.org] that might bridge this gap. It's an open-source, high-performance runtime that runs existing MATLAB code without modification, but with modern features like:
The cool thing is it lets teams gradually migrate - you can run your existing MATLAB scripts while slowly transitioning workflows to more modern tooling. No big-bang rewrites required.
It's still relatively new, but for teams stuck between "rewrite everything in Python" vs. "keep paying MATLAB licenses," it could be a compelling middle path.
What's your experience been with the actual migration process if you've seen teams try to switch from MATLAB to Python?
fuku_visit@reddit
As an example, I do acoustics. One thing often used is a KZK equation solver.
KZK equation Python: literally zero
KZK equation Matlab: 10+
It's a huge amount of work to re-write this, so why waste your time doing it.
Matlab is nice to use and people shit on it often never having used it.
Technical_Income4722@reddit
One thing I liked about MATLAB (I'm all Python these days) was how integrated the terminal is with whatever you're doing in the editor. It was always super easy to run your code to a breakpoint and then manually change or inspect things. There are ways to do it in Python but it always feels like kinda a workaround vs. how integrated that capability feels in MATLAB.
fuku_visit@reddit
Also, the variable explorer is amazing.
lunarpanino@reddit
You can basically do this with spyder
Classic-Database1686@reddit
Spyder is not great in my experience. When I last tried it a couple of years ago the debugger wasn't hitting breakpoints which made it unusable.
Comfortable_Clue1572@reddit
Try Jupyter Notebooks. It’s just the thing you’re looking for.
Brilliant_Bunch_3965@reddit
No they're not
hardolaf@reddit
Except with way more idiosyncrasies and a much higher learning curve and no notification of what cells are out of date after code or data changes.
ok_computer@reddit
My preferred breakpoint is an ipython session
citylikeAMradio@reddit
Very much this. Open program > code w/ debug > analysis out. Python's distribution makes my users want to die
_Denizen_@reddit
With great [software] power comes great [configuration] responsibility.
verymememuchwow@reddit
I find Pycharm is super useful for this feel with python
likethevegetable@reddit
Yeah PyCharm is great, run your code in the console, and get the "code cell" package, it's extremely useful
Remarkable_Lab_8738@reddit
Gibt es hier jemanden der einen kleinen Auftrag will und sich sehr gut mit MATLAB auskennt ?
Remarkable_Lab_8738@reddit
Gibt es jemanden hier der mit helfen kann? Ich muss einen bestehenden code verändern.
Remarkable_Lab_8738@reddit
Gibt jemand hier der mit helfen kann für meine Bachelorarbeit. Muss in MATLAB ein bestehenden code verändern.
Correct_Dragonfly_85@reddit
Matlab is less manual than python sometimes, but it might be geeting easier to implement matlab functions with vibe coding 🤣
AideProud6906@reddit
Many engineers still use MATLAB because quick implementation often matters more than scalability — especially in academia or traditional engineering.
It’s great for fast prototyping with built-in proprietary toolboxes, and many labs already have licenses and legacy code.
Machvel@reddit
a bit late to the party, but i'll say why i think a lot of people at my university (at least in one of the departments i frequent) use it over python
APersonSittingQuick@reddit
Ignoring syntax quirks. I mainly think it's cause MATLAB pumped a ton of cash into engineering and science courses at university. It was a required skill for getting my degree. In the wild I still see a bit ot MATLAB, but the rest of the modelling is py
maorfarid@reddit (OP)
Exactly totally agreed, but for how long it could be sustained?? Buying the hearts of you customers with cash seems to me a horrible strategy for the long run
APersonSittingQuick@reddit
Meh. Excel, c# etc. even when there opensource alts are better and well documented the approach seems to bloody work.
maorfarid@reddit (OP)
Not exactly- Excel survival is thanks to the bundle to Microsoft- the most dominant solution suite for enterprises
APersonSittingQuick@reddit
Yer, but why is it dominant? It's taught in institutions, it's not the best tool for the job and it's expensive
diegoasecas@reddit
what is the best tool for spreadsheets?
smarterthanyoda@reddit
A lot of the time a spreadsheet is not the best tool for the job.
People use it because it’s what they know and it’s what they know because they used it in school.
Interesting-Task3386@reddit
I don't understand your logic. Spreadsheets are a phenomenal tool when it comes to presenting and logging data. Not only are they visually appealing / effective, but they perform tasks that are programmatically comparable to languages such as Python. Although they're not nearly as powerful as other programming languages, a mechanical engineer doesn't need to learn programs that are going to be used solely by software engineers and computer science graduates. It's like requiring a computer scientist to take Thermodynamics and Fluid Dynamics; the concept sounds ridiculous.
QueenVogonBee@reddit
Don’t know why you’re being downvoted. I’ve seen a few cases where people were using spreadsheets when a simple script would have been much better. Much less error prone!
ubermorph@reddit
A lot of the time, the best tool is just the one that is good enough but easily accessible, available and inspectable.
maorfarid@reddit (OP)
IMHO- Google sheets, hands down
ScoobyGDSTi@reddit
Just provided your opinion is meaningless 🤣
icecreammon@reddit
Missing many functions, no macros (or VBA like interface afaik), limited plugins
Sheets is free yet every company still pays for office
gulbronson@reddit
Sheets has macros
icecreammon@reddit
Didn't know that (and hopefully will never need to :) )
Thanks for sharing
Easy_Money_@reddit
Go to Python and generate CSVs with 100k, 1M, and 10M rows. Then try opening them with Excel and Sheets and see what happens. Obviously I wouldn’t use either to handle this kind of data, but a shocking number of my current and former colleagues would. The results will not favor Sheets
GLayne@reddit
Google Sheets is underpowered and unreliable. Hard pass.
captainunlimitd@reddit
Sheets doesn't have half the capabilities as Excel.
otolnio@reddit
Sheets is web native, and leverages this by having great functions to access real time financial and other dynamic data from the web, even web scraping with built in functions.
It also uses JavaScript for scripting, and even allows one to call Python code, instead of dumb VBA. To be fair, Excel recently offered me some Python code functionality - only to then take it away unless I pay for some additional cloud processing capability.
I think the point is: Excel people are too used to doing their VLOOKUPs to try anything new.
This consolidated userbase and legacy hinders any possibility of further innovation.
And I think MS knows it - they even took PowerBI (former add-ons Powerquery, Powerpivot...) off of Excel to push it as a new product.
captainunlimitd@reddit
Power Query is still in Excel and I can add Python without any prompts? But maybe that's just the version I have at work, I'm sure they pay for whatever enterprise version Excel has.
I see your point about moving to new methods, but being web-native always seemed to be a drawback for anything I've tried to use Excel for, including Power Query other data consolidation.
otolnio@reddit
The real time collaboration brought up by the web workflows to me are the killer feature of Google Sheets.
Nowadays I'm back on Excel (full MS suite at my current employer), and even now I'd rather use the cumbersome Excel Online, just to collaborate in real time and not have to download or sync files, over the desktop application.
captainunlimitd@reddit
I've used Excel live collab, and it didn't seem too cumbersome. I guess I haven't used Sheets in that way in a long time though, so maybe I don't know what I'm missing.
trararawe@reddit
The great financial functions in Google sheet are so great that half the time you have to make dedicated cells to cache their values because the "realtime" lookups just don't work for an indeterminate amount of time.
skrio@reddit
Getautahere
skrio@reddit
Getautahereee
Satyam7166@reddit
I’m curious too
diegoasecas@reddit
i just hope they don't say libreoffice calc
Satyam7166@reddit
Haha, hope not
maorfarid@reddit (OP)
I’m not sure about it (I totally may be wrong of course) - excel is default on every windows PC. But like Chrome >> Explorer, I believe Google sheets will prevail too 😉
ScoobyGDSTi@reddit
You mean Edge right... Internet Explorer hasn't been a thing for a decade.
marr75@reddit
I'm not here to say Excel is great, if you're interacting with a point and click app for data management you're in the slow have IMO. But, high end spreadsheet users, like accounting and finance professionals, overwhelmingly choose Excel over sheets or anything open source.
Beyond that, Sheets suffers from the less efficient rendering model of the browser. A big sheet will make your browser chug. If you have any extensions/plugins that inspect the page (VERY common) it'll chug worse. That's technically the user's fault but they don't and won't know or care so if you're making software, it's your problem.
nlomb@reddit
Not to mention Macros, and integrations with sales/finance databases. Is it the most efficient? No. But for accountants, sales professionals, etc. who don't have a coding background it's the only solution that works well in this market without having a team dedicated to curating solutions.
nlomb@reddit
Google sheets is not nearly as powerful as Excel, not even in the same class.
GLayne@reddit
You’re wrong, it’s not included.
EmperorLlamaLegs@reddit
You need to buy a license for Office to get Excel. It may be pre-installed but it will ask you to log into a paid account.
Ixolite@reddit
It's usually the second or third best tool but everyone knows it (or they think they do), has very low barrier to entry and is very free-form so you can use it to do pretty much whatever without much setup. Great for quick and dirty. Horrible as long term solution.
MathmoKiwi@reddit
It depends on the job. For many things then Matlab is the best tool for the job
GLayne@reddit
Excel not being the best tool for the job tells us you really know nothing about the corporate world.
ScoobyGDSTi@reddit
Name on alternative with feature parity. I'll wait.
FrustratedRevsFan@reddit
When Microsoft did their Office suite flex in the early 90s none of them were best in class. WordPerfect blew away Word; Lotus 1-2-3 blew away Excel.
virtualadept@reddit
This is true. However, Microsoft was pumping a lot of money into the field of education to get students acclimated to MS Works (Word, Excel, and so forth) and not alternatives. I was in high school back then and they were pretty open about who was pushing what in the curriculum.
snark42@reddit
I think it was because Microsoft programs for Windows were superior as GUIs were really taking off. WordPerfect and 1-2-3 never had great native Windows versions (Maybe eventually and I'd already moved on to Microsoft products?)
RoyalCondition917@reddit
Every single time I've put effort into learning something besides MS Office, it turned out to not actually be better. Especially the Excel alternatives.
nlomb@reddit
Don't underestimate the power of Excel with VBA and now Python integration. It just takes a lot of learning and configuration to get things to work nicely.
qTHqq@reddit
It can go on forever because the license fees are peanuts compared to engineering professional salaries.
Probably also related to IT headaches (or the perception of) of allowing your engineers to install arbitrary software. Maybe paid Anaconda helps with that a bit but it's less familiar. (I am currently having IT headaches using a Python workflow in a security-managed environment)
I work in robotics R&D and we're now a Python shop but it can be a tough sell when people spent all of undergrad and masters and maybe a significant part of their professional career using Mathworks.
Simulink is also an issue.
Mathworks makes high quality software and are keyed in to the needs of corporate users so it has high staying power.
In researchy and software-dev-heavy corners like mine Python makes a ton of sense, and certainly as you start to fold in AI and machine learning but like 95% of users so far probably don't need that last bit.
The license fees are really pretty reasonable. I've got some $40k per year FEA software that is absolute garbage compared to Mathworks offerings 😂
stmmotor@reddit
Python has nothing even close to LabView, Control Systems Toolbox, or Simulink. Comparing the languages is missing the point, and a common error made by CS people.
Qeng-be@reddit
Matlab has nothing even close to panda’s, scikit-learn, pytorch and tensorflow. All free and with a huge community.
stmmotor@reddit
I agree. Controls and ML are different things. Unless you look at Reinforcement Learning through the lens of Control Theory. If you do that, then it looks like RL is CS people renaming lots of things and applying it to new domains. (Meyn makes this argument in "Control Systems and Reinforcement Learning" 978-1316511961) But even then, I would not attempt RL in matlab, as python has much better libraries for that as you point out.
DR_Fabiano@reddit
Are you sure about that?
pwang99@reddit
Yes, this is exactly right. At Anaconda we realized that once we had unlocked the flywheel of practitioner adoption with creating community meetups etc, the next "unlock" was meeting all of the various requirements that Central IT imposes on their computing systems. This meant putting resources into a lot of stuff which most practitioners don't value, but which IT admins do value and will pay money for.
This is not unlike other "OSS distribution" companies' business playbooks like Redhat, Canonical, SUSE, etc. It is a real need for long-term, sustained change of IT mindsets at the enterprise level. Unfortunately most OSS community members don't ever really see this need or realize how much of an invisible impediment it can be for large-scale business adoption of a technology. But the existence of large industry technology foundations like Linux Foundation, Apache, Eclipse, etc. all are testaments to this need.
The Python software foundation unfortunately doesn't really meet this need, and as a single company (Anaconda) we can only do so much - we really can't shift the entire ecosystem nor provide for all of the community needs. But we try!
AI-Commander@reddit
This is exactly why I made my own business to do an LLM Forward Engineering. Most large companies don’t even realize when extending an offer that their IT department will kill all of my innovation and I’ll essentially be working on my own IT platform that I can’t support with a salary. So if you want the cutting edge work, pay a full billable rate that supports my overhead and treat me as a peer, or kick rocks because I can’t work like it’s 2022 ever again.
Striking-Warning9533@reddit
Buying to get them in, then they pay tons of money for the yearly subscription
clotblock@reddit
My guess is when all of the GenX engineers and scientists retire that python will take over. My colleagues in grad school learned/used matlab primarily because their PIs were more familiar with it over python.
AiutoIlLupo@reddit
GenX here. I never used matlab, went straight to python.
Own_Maybe_3837@reddit
Worked great for Microsoft
marr75@reddit
I can name 25 software companies that have used this exact strategy to grow to yearly revenue in the 8-10 figure range. Big upfront investment but huge returns. Just because you don't like it doesn't mean it's a bad strategy. Yeah, they end up in innovators dilemmas and make outdated crap, but that's not what businesses care about.
Rjiurik@reddit
Yep SAS does exactly the same..now my company is stuck with that outdated stuff. My school recently abandoned it s for Pythin since they multiplied their license fees..
marr75@reddit
That's one of em!
I think this is something AI probably breaks up. You can keep spending too much on tools like this that don't make your employees productive or migrate to something inherently better that an AI agent can operate with light supervision for the easy stuff.
mdrjevois@reddit
AI is an instance of the same phenomenon
BJNats@reddit
Ugh, SAS, grad school, old systems…..gross
Tyrannosaurus_Secks@reddit
ESRI af
marr75@reddit
Yuuupppp
crazy_cookie123@reddit
It's worked for 40 years so far and doesn't seem like it's going away any time soon.
Pepe__Le__PewPew@reddit
Don't forget enterprise support when you have an application issue. Time is money, and having an apps engineer solve a problem is better than digging through stack overflow threads. It's also hard to migrate legacy systems that are working, especially when the cost of failure is higher than the yearly licensing fee.
Also, last I recall (ca. 2017) Simulink was still the gold standard.
To be fair, I have not managed a team that has used MATLAB in almost a decade.
LokiJesus@reddit
This is a huge one and what I think is the main value of the license fee.
Free and open source software can be for people who don't value their time. I used to pound Mathworks support and would get great feedback about solving problems. I would look at our support usage on our site license, however, and see that I was the only one. This was at a non-profit research institute. I think people weren't used to this kind of support. But it would unblock me over and over. It was like having a team of engineers working with me on my code.
This was especially true for application specific engineering problems that are hard to find answers for online. Basically the toolboxes are license fees to have experts in a specific topic available to you to make your simulation/design work. It's like contract engineering support through a software framework.
Also, the interface is really simple and the package management and install are nice and self contained for engineers who work on windows machines and aren't linux pilled.
pepii_c@reddit
I had to learn matlab and python.
OppositeReading6385@reddit
Totally agree! MATLAB was basically mandatory throughout my engineering degree. It felt like every course assumed you already knew it, and it was treated as a core skill to graduate.
ravigehlot@reddit
I can confirm this from personal experience. My father was a university professor in the 90s, and MATLAB was the standard software that universities promoted and required for technical courses.
Dangerous-Code-3975@reddit
there are a ton of reasons..., but one that comes to my mind is how accessible it has been made for students through universities, bootcamps, and other courses. Its usability is also very extensive. Microsoft is trying something similar with Azure by running multiple programs for university students, so that people entering the cloud job market already have a stronger understanding of Azure compared to AWS.
Fantastic-Pie-3018@reddit
Thanks for bringing up this question, lets try to ask this - are engineering industries using python for their safety critical application development? Most engineering requirements involve hardware and ability for code to run on these hardware, like a PLC, how can you use python code on these hardware? So I think the question boils down to what is the requirement. you don't fit the requirements with tools but you choose tools based on requirements. If I am to build a piece of code which needs to run on a device I want the code to be reliable and validated to be correct - I would choose MATLAB for that since it is a verified tool with accountability for accuracy. Where as Python is not and I am for sure not going deep into each library and dependencies to verify it myself. Lastly, if MATLAB can save time by directly flashing codes on my hardware, that is a no brainer for me to use it! I am not going to redo my work to translate at all. No chatGPT wont cut it since you need to have all the constraints and other finer requirements mapped properly.
yourbasicusername@reddit
To me it seems like there is a general preference for what they are productive with, or what they feel like they are productive with.
thraage@reddit
It might not be out of the box. A big part of matlab is the global path you create. If he is anything like me, that matlab he is using is actually highly customized with various things he's made himself over the years.
yourbasicusername@reddit
Ah, right. It’s like one global Python environment with everything needed already installed.
BackwardDonkey@reddit
This isn't an upside for a lot of large enterprises. The risk compliance requirements they will have isn't going to let them build anything that relies on a library written by some random hermit in Russia. That need extensive documentation and they need to know exactly who built it and who is going to maintain it.
A lot of the banking sector circumvents this by just essentially developing forks of Python 2 and they build a lot of what they need in house. Other companies will just pay MATLAB, MATLAB gives lots of documentation, they will even provide on call support for issues.
thraage@reddit
obligatory: https://xkcd.com/2347/
^ this is something companies prefer to avoid
thraage@reddit
I'm not an engineer, but rather an experimental physicist. My work has a strong focus on automation of lab equipment and I think Matlab is the better choice for a lot of applications and I want to make the case for it.
1.) The best documentation you will ever encounter. The entirety of matlab is better documented than the overwhelming majority of python libraries you will find.
2.) Data visualization. There is a reason it's called matplotlib; because matlab's plotting is a standard worth shooting for. Matlab can make "good enough" plots more easily than python. People say python is more customizable. I don't know, I've spent many years publishing papers, I've not had any trouble making the plots I want in matlab, and I make them fast.
3.) GUIs. I can not understate how beneficial it is to put code into GUIs in my line of work. I have limited experience making GUIs in python, but from what I've seen it is MUCH easier to make a GUI in GUIDE or Appdesigner.
4.) The path. The way Matlab handles dependencies is very different from python. dependencies are not declared inside the actual file, but rather are part of the global path. For a lot of applications this is absolutely terrible. BUT, for creating a specialized suite of software tailored to your own lab? It is fantastic. Again, we are bumping up against the difference between a computing platform + programming language vs a more pure programming language here.
5.) The number one positive thing I hear people say about python is that it has a huge selection of free code available online. But that isn't really that big of a deal because it is easy to call python code using Matlab.
6.) standard versions makes sharing easier. If I want to share code with someone, telling them it runs in matlab 2024a is a lot easier than telling them every package's respective version numbers etc.
7.) for loops, while loops and if statements should have an end statement or character. I honestly kinda think C has the best structure here with the { and } but matlab's for and end is solid. Python's use of white space as an end statement is an abomination. Yes, I personally can choose to put an end comment as a personal notation. But I'm still going to have to read a lot of code from other people that didn't stick to that.
8.) Ax = b; x = A\b;
It's a well known meme, but it gets at the heart of a deeper issue. Matlab is built first and foremost as a MATrix LABoratory and so a lot of its notation is more naturally suited for math and mathematically intensive science work. Honestly, math people who've never learned matlab can read a good chunk of matlab code because it is literally the equations they already know.
Airline_East@reddit
Its what they learn in engineering school. That's the primary reason.
Qeng-be@reddit
1) There is no substitute for Matlab’s Simulink worth mentioning. Nowhere on this planet. 2) Matlab has a nice interface
That being said, I switched from being a paying Matlab user to Python in 2019 and I never looked back.
tomqmasters@reddit
MATLAB has a whole plug and play hardware and DSP ecosystem.
ScoobyGDSTi@reddit
For some research and work, you need to have assurances in the software's accuracy and error rates. MATLAB can provide these assurances, open source cannot.
That's not to defend the POS that is MATLAB. Rather the reality when you're a company who's reliant on the accuracy of that data for engineering work that can result in saving or losing human life.
LuggageMan@reddit
I think it's mainly just the industry standard we're stuck with. But also engineers in big companies aren't going to care about free and open source. They care that their simulations/calculations have reliable and reproducible results. Most of the functionality they need is available out of the box, they don't have to deal with different Python versions, pip, etc.
I also think Julia is a better candidate for replacing MATLAB since it's built with the scientific computing ecosystem in mind.
Ma4r@reddit
I haven't seen a single engineer that if given the choice would choose matlab. It's an atrocity
Deep-Rich6107@reddit
Support
hardolaf@reddit
When I was at a Fortune 500, the cost of our tools was never a concern. Now, I've been at trading firms for almost 7 years and the cost of tools matter.
Dropping $50M/quarter on some tools from a vendor was nothing to my first employer out of college. We were far more concerned with the cost of building and insuring HPC datacenters. We were up to in 19 datacenters running only EDA related jobs and simulations with 8 more datacenters running mission critical software for our clients and our own business.
And the CIO cared far more about having people assigned to optimize my HDL simulations on an IR&D project than the cost of the software involved. Before I left the company, it was costing the company over $500K in pure computing expenses (power and assignable value of the servers) per work day just to allow my team of 4 to meet our every 90 day delivery SLA for rapid prototyping (4 of us out of over 300 people on the project were responsible for producing prototypes for testing). Assigning 4 verification engineers billing $180/hr average to our project to optimize the entire pipeline and increasing the license tier for one of our tools to get access to newer features saved literally tens of millions of dollars after all other expenses were accounted for.
Compared to those expenses, what's some cheap Matlab licenses?
quieroperderdinero@reddit
What the hell are you guys doing there? Simulations of another dimension?
hardolaf@reddit
Avionics development. We were making FPGA designs and ASICs. We had an acceptable critical failure rate of never for everything we developed.
Faraday_00@reddit
Were you doing multiphysics analysis with redundancy? Can you tell more about it?
hardolaf@reddit
That was mostly just circuit simulations.
quieroperderdinero@reddit
Lol no. I was just a marketing analyst and heard stuff when drinking beer with engineers
quieroperderdinero@reddit
Ah that makes sense. Aerospace industry is no joke. I worked for a semiconductor company so I've heard some stufd about those designs.
MathmoKiwi@reddit
Yeah Matlab really isn't expensive no matter how you look at it!
Students? You get it for free!
Professionals? It's pocket change.
Faraday_00@reddit
I am one of those people and I confirm what you say. I use Python nowadays because MATLAB is not an option anymore, but I would never make the switch if it was not necessary.
pawulom@reddit
MATLAB has a lot of great built-in tools. They are well documented and even have references to scientific papers, which is important when you are a scientist. Many things work in MATLAB out of the box. The graphical environment is also great compared to VS Code + plugins. It works better especially in debugging scripts. Also, MATLAB has much better support for parallel execution. For me, it's a much more efficient tool than Python.
Ok-Response-4222@reddit
MATLAB does all they can to get in kahoots with universities, to foster generations of people in less programming intensive degrees to use it as a go to.
I live in Denmark where the insulin giant Novo Nordisk hires tons of chemistry and biomedical people. They all are used to MATLAB from university, so they reluctantly pay HUGE piles of money to have it available.
Its just business.
Key-Government-3157@reddit
Something not said, the documentation for matlab is on another level.
TheBlackCat13@reddit
For the widely used python packages and the core language these days the python documentation is way above what Matlab has. The python ecosystem has been massively improving their documentation while matlab has kept fairly static. And there is also the issue that python devs generally consider documentation errors to be bugs, unlike Matlab devs, which can lead to situations where Matlab documentation is simply wrong, even for core language features.
For less widely used tools it is more variable. Python documentation is either very good or very sparse. Matlab documentation in similar cases is generally mediocre, one decent example and fairly bare bones api documentation at best.
mattrad2@reddit
I use matlab a ton, only found wrong documentation a few times.
mamaBiskothu@reddit
Never heard this before.
TheBlackCat13@reddit
Here is a case where the
save
mattrad2@reddit
I think what you’re describing could totally be present in parts of python also. It’s just that the core functionality of python is going to be a lot more solid than matlab.
TheBlackCat13@reddit
That is what I said. For small, not widely used packages, python documentation is hit or miss, while Matlab documentation is mediocre. But for the core language and major, widely used packages, python documentation is leaps and bounds better than Matlab documentation. This applies to organization, clarity, completeness, and most importantly accuracy.
Fit-Faithlessness-28@reddit
I use Python exclusively now however back when I was an optics researcher I used MATLAB. For most libraries I still wish for MATLAB level detail.
TheBlackCat13@reddit
Have you placed Matlab and Python docs side by side recently?
nicalitz@reddit
Strongly disagree. Base Matlab maybe, but many toolboxes are woefully underdocumented. One of my biggest frustrations on an almost daily basis
gahel_music@reddit
In my experience (statistics, machine learning), Matlab documentation is really bad. Scikit-learn documentation is the best resource out there for machine learning.
FrickinLazerBeams@reddit
For statistics it's pretty good. Of course python is better for ML, that's kind of a pointless comparison.
gahel_music@reddit
In Academia, it's not uncommon to use Matlab for machine learning.
FrickinLazerBeams@reddit
That's weird.
gahel_music@reddit
You don't say
HarmadeusZex@reddit
We can agree Python sucks
darknessgp@reddit
The way you phrased it can explain a big reason "still stick with". Why would someone learn a whole new programming language when the one they know works fine for them? They already know the problems and how to work around them.
ImdustriousAlpaca@reddit
Stop with the AI, the general public does not want it forced into everything, it's exhausting.
Fit-Elk1425@reddit
Probabily because more people have been expressely taught how to do math releated things in matlab while engineers probabily think of python as the language for developing things in. Plus even in my scientific computing class I think some just found matlab easier for doing math releated problems
NeverRunOutOfBeer@reddit
Too much organizational legacy code still in heavy use. When I retired, python was making inroads with brand new efforts, but we estimated it was going to be a 10-15 year process to migrate enough to python to get out from under the bulk of the matlab licenses without major disruptions to work or funding. No surprise that the idea lost steam quickly.
Nice-Republic5720@reddit
The gui and help
Training_Advantage21@reddit
A lot of my university degree in the noughties (2000s) was in Matlab. At the time Matlab had very good signal processing and optimisation toolboxes that I used for projects, and of course Simulink.
I picked up Python a few years later, I was in a more earth science environment and people used IDL rather than Matlab, but the younger researchers were discovering Scientific Python.
From news stories I 've seen in subsequent years from both from my university and from this science place I worked in, they have both adopted Python.
Personally I think Python is great as it covers shell scripting style capabilities, Matlab/IDL and R like capabilities. I used standard libary for a good few years till the Anaconda distribution made the scientific stack a bit more accessible, then I was in jobs with Cloud Notebooks using Pandas on most days, and I also use VS Code on the laptop pip installing whatever I need. I really like SciPy which is quite close to Matlab in some ways. Great statistics functionality and the signal processing module is also pretty good.
The problem with open source is that there are too many competing libraries and tools doing nearly the same thing, so a newcomer needs to carefully navigate quite a confusing landscape.
TheOneRavenous@reddit
Because it's taught in engineering. Also some some special constants out the box that have to be defined by Python software author.
el_box10@reddit
First, is it true that engineers prefer matlab over python ? I am not sure how we can verify that.
Personally, I can't decide whether I prefer MATLAB or Python in my daily work. I'm a control/embedded systems engineer, and I spend about 40% of my time working in Simulink. So whenever I have something in mind, MATLAB is already open, and it often feels more productive to use it for certain tasks. The IDE experience is excellent and well integrated with other MathWorks products.
On the other hand, when I shift to working on the embedded side especially with toolchains and scripting I tend to prefer Python. It feels more flexible and better suited for the "dirty work" involved in those tasks.
In the end, it really depends on what you're doing. It's not about the year, just because it's 2025 doesn't mean everyone should be using Python.
cjs8399@reddit
Always use Python for command line, plotting stuff in an automated fashion. Repeated data processing. Anything where I care about startup time also
There are still many things for which Matlab is syntactically terse in comparison. Most scientific functions you don't need to import.
You could easily argue for one of the other but there are use cases that I just prefer MATLAB.
Theninjapirate@reddit
I use Python more but here are a few reasons I see:
Familiarity. Engineers can be very stuck in their (our) ways. Why learn a new tool when we know how to get shit done with this tool?
Support. Having a company you can call for support is a big appeal in a corporate context. Paying for a tool gives a sense of entitlement, rightly or wrongly, to support for the tool.
Cost. It doesn't matter as much as you think when a big company/university is paying for it.
GUI options. Python has multiple GUIs and things (cli, IDEs, I Python notebooks) which are confusing to a newbie compared to one more seamless environment which comes in one installer.
randomatic@reddit
I'd add in "simulink". When you're building an embedded system, esp one with compliance requirements, matlab/simulink and the ecosystem has support while python does not.
Honestly python is not a good choice for embedded applications. To quote marge simpson, i didn't say you couldn't, I said you shouldn't.
adamwhitney@reddit
I think Rolls-Royce still use simulink to create their engine control systems. These are really critical systems and being able to see and simulate clock cycles is important so a timer module on simulink is great.
I believe they have an in-house tool that turns the simulink model into machine code to be flashed to the electronic engine control unit.
Also means your diagrams are never out of date, as the diagram is the code.
Assuming an equivalent ready to use tool existed with Python, the cost of changing to a new solution would not just be a bunch of time learning a different tool and redoing all the code, but also would lead to retesting and recertification of all of their EECs.
Theninjapirate@reddit
Agreed. I almost added Simulink to my list but I don't really use it so I can't comment intelligently on it so I left it off.
maorfarid@reddit (OP)
Interesting, I haven’t thought about it thanks!
einsteinxx@reddit
In a large engineering company, getting a Python install with the libraries you need is often not easy, especially when multiple installation types (anaconda, enthought, pypy?,…) and versions are requested. You don’t always have access to the latest versions and you may not have all the pieces you need for your particular project. With Matlab, once it’s installed (usually you get access to the available list of toolboxes from the license servers), you have everything installed and your setup looks like Bob’s in the office next door. Matlab used to be the “Prototype it first and then put it into a real language” for daily usage tool. Python is slowly getting to that point, but it needs some polishing. I have no excuses why simulink is used more than it should.
R3D3-1@reddit
Oh boy, your post just reminded me that the scripting capabilities of our software were switched from Python 2 to 3 only last year or something...
maorfarid@reddit (OP)
Super interesting, thanks I think the main reason is the first one- familiarity. Tools for engineers is a “church-like” behavior- like “if I was born to the catholic (Matlab) I probably will never convert to be a Protestant (Python)” etc It became and identity, part of the engineering pride But I still don’t see a logical reason.
Standard-Square-7699@reddit
Professors who don't want to change.
chaoselementals@reddit
When I first started using Python, I was completely stumped by package installation and version management. MATLAB would release 2 versions per year and they just installed and worked. Meanwhile, with Python there's pip and Anaconda and Spyder and VSCode and matplotlib and plotly and pandas and polars and it was very overwhelming. Why switch when every company I ever worked for paid for a MATLAB subscription anyways?
Worth_His_Salt@reddit
One word: inertia
Ok-Lingonberry-8261@reddit
I switched in 2018, but I know some niche applications people use MATLAB for because no one wrote the Python library yet.
Also, I'm unaware of a FOSS alternative to MATLAB's "Simulink." I know people who still use that extensively.
paulmaitland@reddit
Juliahub have just released a system called Dyad which aims to replace Simulink. It runs in Julia so should be fast, and flexible.
MerrimanIndustries@reddit
We're not fully FOSS but we're building an alternative at Pictorus! We use Python as a scripting language, generate Rust as our embedded code, and open-sourced our core code gen library.
gitgud_x@reddit
That looks really cool. Best of luck to you guys!
Faraday_00@reddit
Good to know. I am interested.
MerrimanIndustries@reddit
Feel free to DM me or reach out through the website if you want to chat more!
Proper-Ape@reddit
That's amazing. I'm not in the controls field anymore, but Simulink was always the thing that was missing in Python.
Building on top of Rust chefs kiss.
Any_Letterheadd@reddit
Modelica does a lot of similar stuff but all the best implementations are not free
No_Mongoose6172@reddit
What I like about modelica is that your knowledge is transferable. You are less attached to a particular tool, which means that you can choose the commercial or open source implementation that provides the best tools for your needs
No_Mongoose6172@reddit
Openmodelica and scilab's xcos are open source alternatives to simulink. The good thing is that as they are based on modelica and fmi, they are compatible with most commercial simulators (including simulink). You just need to export your simulink model as a FMU and it can be used directly from both of them
AbuSydney@reddit
I think Scilab has an alternative,
EarthGoddessDude@reddit
There is ModelingToolkit.jl, but not 1-1 afaik: https://www.reddit.com/r/Julia/s/1OOXf6vs2u
Voidheart88@reddit
I use ngspice and kicad as a FOSS simulink alternative. That was the time where I stopped using simulink at all
radium505@reddit
Scilab has xcos which is similar to simulink. https://www.scilab.org/software/xcos
hardolaf@reddit
Xcos is a toy compared to the functionality offered for very little money that you can license for Simulink.
boatzart@reddit
I used matlab a fair bit in grad school but never really touched simulink. Mind telling me what’s so powerful about it?
2aywa@reddit
This is the right answer.
mattrad2@reddit
Mehhhhhhh
TheOnlyBliebervik@reddit
Yeah... I never really tried Scilab. Downloaded it, never used it. Is it any good? Can it simulate circuits well? How are the control system blocks?
travelinzac@reddit
Start naming them so we can fix this?
markkitt@reddit
Maybe Dyad is the answer here:
Not exactly FOSS, but FOSS adjacent in that most of this is a FOSS stack: https://juliahub.com/blog/dyad-making-hardware-as-easy-as-software
Comfortable_Clue1572@reddit
I used octave about 5 years back when I took Andrew Ng’s class on machine learning. I’d taken linear algebra back in the mid 80’s, long before python existed.
sylfy@reddit
Python back in the Python 2.x days was still a mess. I started out doing machine learning in Matlab too, then switched over too with Pylearn and Theano. Python wasn’t always a given though, I spent a few years using Torch with Lua before PyTorch was released.
TheBlackCat13@reddit
I know a ton of people who use Matlab solely for things that would be faster and easier in Python
wintermute93@reddit
There are also a lot of really specific packages for stuff like RF analysis or robot control systems or whatever that are very hard to replicate. If you're just using Matlab as a fancy graphing calculator with matrix algebra, stop that and use numpy/scipy/sklearn/seaborn/etc. If you're using some kind of industry-specific add-on to the base software, there's probably a good reason; keep doing that.
vintergroena@reddit
Yeah I think Simulink is the real answer
Quick_Humor_9023@reddit
There are many domain specific things in matlab that don’t exist in python (or are some os project whose support stops when the authors focus of interest changes). Continuity matters a lot in professional setting. Matlab toolboxes generally also have support options available.
Prize-Flow-3197@reddit
For academic research, honestly there is very little reason to use base MATLAB. When I did my engineering PhD I had to use it because there were some specific niche packages that didn’t have Python equivalents.
It’s in industry where Simulink etc. is still the best solution. Industry engineers want to drag and drop functions so they can focus on the actual system design and analysis. Most engineers graduate with (at best) average programming skills, although there are obviously exceptions.
steveo_314@reddit
I prefer R over python
RequirementBusiness8@reddit
One thing I can add, which probably isn’t the actual driver, but makes a real difference. If you are running Matlab, you add in the MATLAB libraries you need for whatever calcs/sims you are running, you are good to go.
Running things in Python, depends on what version of Python you are running, what OS you are running, potentially what video card you are running, is your library going to work, will it load, will it give you errors, etc.
A few years back, I took an intense AI program at a state university (sponsored through work), the variability of versions and libraries and hardware meant there was quite a bit of extra troubleshooting to get things working. MEs are not being paid to sit there and troubleshoot python and library versions. They want to be able to run their calcs and sims, and be able to reproduce it without headaches.
I work in IT (infrastructure/systems), mostly completely an undergrad in mechanical engineer and physics, but had to drop before finishing because I had to get back to working. I’m rusted but have walked both worlds. Admittedly, having an IT background in ME gave me a huge leg up on anything we had to related to coding.
BitOBear@reddit
Octave.
Substantial-Flow9244@reddit
There is always Octave...
chris_insertcoin@reddit
For some Matlab toolboxes there is no equivalent in python, especially around Simulink.
Africa_versus_NASA@reddit
In my experience Python's scientific plotting and data visualization (matplotlib, etc) suck ass compared to Matlab.
selcuksntrk@reddit
MATLAB has many optimized scientific computing libraries. This makes it faster at mathematical calculations, a speed you can't achieve with Python. Machine learning is a math-intensive field that requires matrix multiplication, which is why you'll see MATLAB used in artificial intelligence. The computational costs, in particular, become more expensive as the model grows.
ChristianKl@reddit
MATLAB uses Intel MKL for matrix multiplication. On the other hand Python's NumPy gives you the choice between OpenBLAS, Intel MKL, and ATLAS.
If your main computational cost is about matrix multiplication, it costs the same when you like MATLAB call Intel MKL then if you let Python call Intel MKL.
LLMs like those used in ChatGPT, Gemini and Claude are all python-based and not MATLAB based.
Excellent_Debt_9567@reddit
Honestly, i prefer python over MATLAB any day + i have to work with multiple teams and everyone knows python, so it gets easier also i try to shift people from MATLAB to python hehe
Creative_Sushi@reddit
A lot of people have similar situations, and Python users and MATLAB users collaborate by taking advantage of interoperability features. People are resources and keeping them productive is an important priority for many companies, and retraining cost a lot. So they like this interoperability approach.
https://www.mathworks.com/products/matlab/matlab-and-python.html
GitsWhy@reddit
MATLAB’s got a killer ecosystem , its toolboxes for stuff like control systems or signal processing are super handy, like grabbing a ready to go toolkit. Python can do the job too, but you’re often piecing together libraries like NumPy or SciPy, which can feel like a bit of a hustle.
substituted_pinions@reddit
MATLAB is like the engineering version of guitar hero—4 buttons to make music vs. endless variations of fingers on frets —knowing positioning and music theory.
Jolly_Significance56@reddit
Because MATLAB has Simulink
MachinaDoctrina@reddit
They don't, the universities get perks to use MATLAB in their classes, things like signal processing etc are easy using simulink and the add on modules, as well as the install for the university is easier than setting up ends for python etc.
The engineers get stuck in the only language they know and try to get employers to buy the licence (some do), most don't, they get forced to learn python then eventually figure out it is in fact better.
And the cycle continues, this is MATLABs business model.
CandleSubject8714@reddit
Engineer by training? You are not an engineer my friend! You are a mechanic...
AsleepTackle@reddit
I realise matlabs advantages now. For me it's that it uses Fortran array ordering. This means less copies are made and calls to the blas, lapack, argpack backends is faster. Python is C-based, thus, a pain.
wimshurst@reddit
Simulink and toolboxes have already been addressed. There is also support. For regulatory or other reasons, some industries require support. It exists for numpy, but it would be necessary to assess the quality, I have no idea.
You say Python is the most popular: yes, it has been for a few years, and it won't be forever. Some projects span decades and can't afford to switch to the latest hype language.
Python is also far from perfect, even if it tends to get better. Not necessarily worse than Matlab, but it lacks features that would make it a good reason to switch: lack of static typing can be a concern for large projects, the GIL is a problem, now that Moore's law is essentially defunct, and performance improvements depend on parallelism. And Python is only starting to use a JIT. Right now I think Julia may be a better option in many cases - but Julia is also a bit young.
That said, many projects have switched, and some research projects started from scratch with Python more than 20 years ago.
Expensive development environment are no longer seen as the best solution, and it's not only about Matlab: in my field, SAS was considered the norm until around 2015. Since then R and Python have started to grow, and after SAS dramatically increased prices recently, the switch is much more massive, worldwide. For data engineering and data science Python is now the norm, and for data analytics it's probably still R but Python is growing as well. In many sectors, SAS is going to disappear soon (and SAS has also features not found in R / Python by the way).
xenmynd@reddit
Matlab has a lot of niche academic code/libraries that python will never have. Look at Kalman filters instance. You will see filters you've never even heard about in Matlab.
DragonfruitGrand5683@reddit
Python wasn't a popular kanguage when Matlab was created so it became the industry standard.
Pineapple-Entire@reddit
Got a MEng in EE and the answer is MATLAB could run niche various simulations that AFAIK even there are not any open or close developer to reach what Mathworks has done, that is Simulink.
I didn't found any software that can be easily done on MATLAB for my projects.
Machine learning, data science, computer vision, artificial intelligence? Python.
But, inverter, control block diagram, power flow simulation, with powerful integration to coding to easily edit the data? MATLAB
Leverkaas2516@reddit
I think this woefully understates the key issue: I've sat and watched people who have Matlab syntax deep in their bones, and they are able to express and explore complex groups and sequences of mathematical operations in just a line or two in a way that Python can't come close to supporting. It comes out of their fingers, like breathing.
This is irrelevant, if there's even a slight difference in productivity.
ditto
These people don't care about popularity, about following the crowd, impressing others with their choice of tools. Exactly the opposite is true.
This is the sole reason I've seen these types of engineers switch. Show them a 50% performance improvement and they will climb any learning curve no matter how steep. They won't do it because Python is what the cool kids are using, but they'll do it to go faster.
Barbatus_42@reddit
As a computer engineer who didn't encounter Python until already having learned Matlab, Assembly, Java, C, and C++ to an extent, I can testify: I immediately dropped all that other shit and switched to Python for everything I was able to use it for. I actually changed the trajectory of my degree and future career because of how much I preferred working with Python, lol. I still use other languages on occasion if I don't really have an option, but that doesn't come up very often.
tarheeljks@reddit
python subreddit doesn't seem like the best place to ask this
VillageSuch3548@reddit
I just learned my company has been spending money on multiple MATLAB licenses for 5 years because 1 dude wrote a script to generate plots from MATLAB in 2020. A recent Windows update broke his script while he was on vacation, so I had the pleasure of building this plotting tool from scratch in Python.
I get that MATLAB has Simulink, but plotting? Like literally the only libraries I needed to replace this thing were Pandas and Matplotlib. Sorry, I'm salty as hell about this.
LargeDietCokeNoIce@reddit
Can’t stomach either. Both rediculously slow at scale and no strong data types mean they’re big factories for any program over 20 lines
sn0wy17@reddit
I haven’t touched MATLAB since I was required to in school. Most things I have built since then are python. And to be frank, most of my fellow engineers don’t and haven’t touched matlab either. To us, it seems archaic.
Smart_Tinker@reddit
I’m an engineer, and I use Python. Of course MATLAB (or Python) didn’t exist when I graduated. I was taught C (and Pascal, and APL), but I am an electronics engineer - software is just something I need to know.
Some of our systems are programmed in MATLAB, probably because that’s what our physicists know, but we also have ton of ancient Java 8, mixed in with some Python.
When I need to write an app for a customer, I use Python, because it’s easy - and I taught myself Python programming about 10 years ago.
So, I choose Python (with a little help from C sometimes for speed or embedded code).
GKBlueBot@reddit
As others said, probably a force of habit. I'm a bioengineering student, and some of my courses (mainly neuro or signals) were in MATLAB, so I had to learn those. But I also work in ML, so I also learnt Python for some ML classes. As a result, I'm more comfortable in Python, but for some stuff, like signal processing, MATLAB gives more "home" vibes than Python.
petecasso0619@reddit
The auto code feature is nice. I also love the signal processing toolbox and the radar toolbox. Yes you can do all the work to create those yourself from scratch for python but why?
de6u99er@reddit
MATLAB is often favored in regulated industries (e.g., automotive, aerospace, medical devices) due to its established toolboxes, rigorous documentation, and certification kits that aid in compliance with standards like ISO 26262, IEC 61508, and DO-178C. Its environment supports verification, validation, and testing throughout the development lifecycle.
Faraday_00@reddit
MATLAB is much easier to start using for a layman like me. Being made by a single company makes it much easier to integrate packages too, imo.
I have been using Python for 3 years, because we do not have MATLAB licenses in my company. I am more fluent in Python than MATLAB nowadays, but setting it up for the first time was much harder.
Little things that are easy for people knowledgeable on programming are quite hard for me. I still cannot set virtual environments using vscode despite having tried for many hours. (We do not have a license for Anaconda. I only use it at home for personal projects).
Another reason is how powerful Simulink is for people working with control system design and model based development. Afaik, Python does not have anything like that.
Krimson_Prince@reddit
I will never know. Honestly Julia + python has been a great experience for me. I wish more people knew about julia because it has SEAMLESS python integration. So you are literally coding in essentially python with the added benefit of all of Julia's inherent capabilities like multiple dispatch, parallelization, etc.
CaptCrash@reddit
Having used plenty of both in workplace settings, I think these are the main things:
Proper support. Something goings wrong mathworks will help you figure it out. I’ve been on the phone with them personally.
Built in tooling vs imports - yes Matplotlib has (mostly - I would argue not completely) caught up with matlab. But at the end of the day, there’s an extra hurdle to using Python, even if it’s a small one. For Python, this is a good design. It’s completely general purpose. For matlab, this a is a good design. It’s specialized towards engineering purposes.
simulink - not going to dive into this one but as a mechanical engineer I’m kinda surprised that your head didn’t go here immediately. This one though also goes into skill base coming out of college as simulink has a huge presence in controls and for good reason.
momentum. Inevitably, with every large project someone will want to rewrite the project entirely, whether it’s matlab to Python or C++ to Rust. This is almost always a bad idea and someone who is actually familiar with the project will have to tell them. Momentum then also effects your engineer’s skill base.
lightmatter501@reddit
MATLAB has paid for the pile of certs needed for them to be blamed if sims go wrong. If an engineer uses python and it has a bug, that’s on them.
BigCardiologist3733@reddit
corruption and nepotism and incompentent profrssors and managers
nwbrown@reddit
Universities.
spacegamer2000@reddit
Learning to code with zero based array indexes instead of the 1-based in matlab is a huge hurdle for many.
nacnud_uk@reddit
Never used MATLAB, no idea what it is. Engineer: 30 years.
Just use the tech that you enjoy.
JimroidZeus@reddit
I’m sorry what?
moric7@reddit
Because: 1. Matlab has MAGNIFICENT help system and Documentation - large, beautiful, simple, clear, useful even to begin learning in each science area! Python has no documentation (unreliable online not counts) or chaotic insane structured monstrous documentation specially made to nobody to understand and to can find nothing in it (Python itself, numpy, matplotlib, scipy). This is because the software is free and they take money from courses and books. Because of this the developers use AI, no documents. 2. Matlab is monolith, all batteries presents and ready to cooperate as one. In the Python constantly must use internet to search and try if on the dumpster there is something usable among the garbage. And after that each garpage (library) needs self python installation with dependencies up to trash the disk just like the insane JavaScript metastases. That's in short.
bjpelcdev@reddit
My aero engineering degree and PhD were both done on MATLAB and I work in data/AI these days where I mostly use Python and in the 20 years in between I have used maybe a dozen languages to varying degrees. The one thing I haven't come across in any other language is an equivalent to Simulink.
Zomunieo@reddit
There’s a few uses.
Some of the Matlab toolkits are quite powerful if you need turnkey solutions.
Some people need to run Matlab code published in papers to explore/implement other researchers’ ideas. Maybe they won’t run it in Matlab ultimately but copying existing code is a good place to start.
Simulink has no real open source competitor if you need to model a complex nonlinear system and you’re mainly concerned with functional blocks.
spartak1@reddit
I've only ever used Simulink in Uni. But I've been told OpenModelica is a loose alternative to Simulink. I've played with OM before, it's also not the most user friendly tool and I gave up pretty quickly.
hardolaf@reddit
The only real alternative is restricted to US defense and space customers only. And even then, most designs start on Simulink and then get converted to that solution for making the hardware implementation.
gomoboo@reddit
Which solution is that?
hardolaf@reddit
Annapolis Micro Systems makes a block design turnkey solution for RF and control system FPGAs and ASICs.
carloom_@reddit
Inertia
Dry-Airport-2675@reddit
Coded in MATLAB for 20+ years. Tried Python but could not get used to it, especially the syntax and the array indexing starting at 0. I could if I wanted to put in the effort, but I did not see a reason to. I don't like Python and it's just what it is and I thought I would die a MATLAB junkie. Then project constraints pushed me into Julia and I am not looking back.
SymPy is nice, though. So much better than syms, and renders the LaTeX directly in a MD cell with VS Code. itissomething.jpg
wasnt_in_the_hot_tub@reddit
They do?
Pristine_Gur522@reddit
Because MATLAB is the best newbie language for students whose concept of a program is "something I double click on to install, then double click again to run". Professors and TAs love it because they don't have to work tech support like in a C++ class. Simulink is the only reason to use MATLAB irl. Everything else can be done better by a different language.
SongsAboutFracking@reddit
Simulink, Signal/DSP Toolbox, FPGA/ASIC tooling, easier to use on secure environments, legacy code from 20 years ago just works. I’ve just started a new position where MATLAB is the name of the game for most our models, moving from 99% python, but it makes sense even though my number of daily headaches has shot through the roof.
TheNakedProgrammer@reddit
matlab is actually scaling very well, we did run a matlab cluster at university. You would need to put in quite some time and effort to build something similar in python.
Matlab brings a lot of comfort function, the documentation is great and you get support and quality.
Easy to see why it is popular. Main reason i use python is because it is free.
HuygensFresnel@reddit
Mostly because its what they are used to i think. And for more senior engineers probably just not willing to transition. Its insane to me to. Why is the sinc function behind a paywall? Its literally nothing more than
If x==0 return 1 Else: Return sin(x)/x
AnotherProjectSeeker@reddit
If you are a big enough client and need a new functionality, Mathworks will develop it for you. In Python you either develop yourself or you're out of luck. Similarly, big enough clients can just reach out to Mathworks support and they'll help, Python you're on your own.
For small groups and individuals, Python should offer the same or better, for large clients with a consolidated relationship with Mathworks it might not be the best choice.
Plus simulink ofc.
paradigmx@reddit
It's simple. Most people aren't interested in learning something new if it isn't forced on them. They learn what they learn in school and don't want to have to learn anything else.
dfiru@reddit
I think it is likely just a comfort thing. It is taught in schools. So if you have a tool you know will work, you use it.
skintigh@reddit
In the late 1990s in a class we had to compute the heat distribution on a circuit board. Matlab could compute it in about 45 minutes. I wrote the same program in Delphi and I could compute the temperature and display it as color in a fraction of a second. I went on to make the chips on the board drag-and-drop with real time updates so I could find the most efficient layout while other teams were still waiting for their first output.
Never considered Matlab after that. It's a joke.
Valeen@reddit
Traceability and support are 2 good reasons to use Matlab over Python.
Also as someone else mentioned, a lot of companies lock down their sw, you might not even be able to install Python or if you can you may run into issues installing libraries. Sharing your code with other engineers is easier with Matlab in those situations.
That said- I don't think I've touched Matlab in a decade.
that_baddest_dude@reddit
Yeah I'm behind a corporate firewall. I'm constantly annoyed to hell and back at random libraries or tools that purport to be "easy" but frequently or needlessly ping servers to try and download stuff, and offer no configuration for proxies and the like.
I think there were 3 domains I hate to whitelist as "trusted" in addition to setting an http_proxy environment variable just to pip install something.
You can't use map plots in streamlit if you're inside a firewalled VM, because it assumes you loaded the data from a URL, throws it away, and attempts to load it from a URL again.
duckdb has some extensions that couldn't (at the time at least) be directly installed, but instead checks if they're installed at runtime and attempts to download them if not. Insanity!
Many companies have very closed off systems and buying Matlab may be more attractive than letting users go nuts installing python packages to get the same functionality.
that_baddest_dude@reddit
I've never used Matlab outside of college
galenseilis@reddit
For the engineers I know that have stuck with MATLAB, it is mostly b/c of what they're comfortable with from their schooling days. They'd rather be working on engineering problems than learning another programming language.
twd000@reddit
cost - I don't care; my employer pays for the license. If a yearly enterprise license is $1000 that's only 3-5 hours of fully-burdened labor rate for one engineer.
speed - code execution time is often trivial compared to engineer's time writing and debugging code. In that case, using the familiar tool is "faster" regardless of runtime.
setup and ease of use - MATLAB is fully self-contained and "just works" out of the box. Python dependencies have been a nightmare for us. Every user's installation and package library is different. We also work on some air-gapped systems, so "pip install" is not an option. Burning a CD every time you realize some dependency is missing, is a huge waste of time.
DataCamp@reddit
Inertia and integration, most likely.
MATLAB still wins in some niche engineering workflows—Simulink especially—and for teams where IT, compliance, or legacy code make switching a non-starter. Add in academic exposure and solid vendor support, and it sticks.
Python’s winning ground fast, but for many engineers, MATLAB still “just works” for what they need.
Creative_Sushi@reddit
It's very simple - there is no such language that can absolutely do everything, and there are many things that Python is not be the best tool for the job and MATLAB may be. Engineers are by nature problem solvers and it's part of their job to know how to choose the right tool for the right job.
On the other hand, people who think one language can handle all possible use cases are probably suffering from some kind of cognitive bias, such as Dunning-Kruger effect. If you are a true expert, you know you still don't know a lot and respect the expertise of others. If engineers continue using MATLAB, they have good reasons to do so.
ac8jo@reddit
I'm in civil engineering/transportation planning/transportation data analytics and all the Matlab stuff that I see is from universities.
I use Python, R (when I can't avoid it), and a few languages that are very specific to software I use (GISDK/TransCAD, Cube Voyager). Note that those major software platforms can call other programs from a command line, so there are times when I'll have one of them call a Python or R script.
CourseCold9487@reddit
In the Defence/Aerospace industry, you can’t really run open source software on sensitive workstations due to possible security risks. MATLAB is locked down, and all packages are self contained. MATLAB is better at array operations, when compared to the Python equivalents. Furthermore, the support you get from MathWorks is second to none. I prefer python, however.
randcraw@reddit
Most Matlab codes also have far fewer dependencies on external modules than Python does, making installs of Python shareware codes much trickier (and less secure) than Matlab codes.
Python is less backward compatible too. Older Matlab code ports to newer environments easier than old Python code. I've seen all kinds of difficulties getting older Tensorflow Python code to run in newer versions of TF or Python.
The Python community does not value code stability as much as Mathworks does, and it shows. There's a TON of legacy Matlab code out there (much solving academic problems) that continues to work after 15 years or more. Not so with Python, in my experience.
And the Matlab IDE is lightyears ahead of Pycharm or Spyder, which remain slow and clunky and apparently will never improve substantially.
ohiocodernumerouno@reddit
one word: training.
AgnoSticker@reddit
In the field of simulation Electrical engineering it was good. Offers good examples to start with. But for cutting edge AI, ComputerVision areas Matlab seems to play catchup with OpenCV, PyTorch etc. These fields are just not it's cup of tea. As for other engineerings, I can only assume, either it was already existing solution in their eco-system or they are lazy to try or get to know what's out their even if those solutions are better than existing solution in existing eco-system.
arthurno1@reddit
Because that is what they learned back in 90s and early 2000 when they were at Uni. They are now bosses and don't care to re-learn what they already know.
Plus, mechanical, electrical engineers, physics engineers even mathematical, were, at least as much as I met them, never really into programming. At some companies LabView is still big.
They get less training in programming, get through the course because they have to, and believe all this with data science, boring algorithm and structures is a not needed mambo-jumbo; they can learn just what they need om the go. Of course, I am sarcastic a bit, but I have literally heard that from engineers and people whonown small business I sometimes consulted with/for.
CaptainPitkid@reddit
When I was in college the biggest thing was, despite the student body's interest and practice of using Python for a lot of our projects personally, the courses required us to use/learn MATLAB.
_cynicynic@reddit
Simulink
Plus_Factor7011@reddit
Because Pythong is a coding language and Matlab is a whole ass environment + language. Two completely different things.
Brilliant_Bunch_3965@reddit
Because an electromagnetic scattering code that was written in 2006 is written in MATLAB and I don't care to rewrite it to python.
CreeperDrop@reddit
Many engineers rely on Simulink for their work and MathWorks pumped a lot of money into the development of their toolboxes. So unless someone does it in Python, I do not see any of them moving any time soon. Another issue would be the interoperability. Many teams have old models that would be a pain to work on now so that's something else. You also have some hardware support from MathWorks if you have DSP and Microcontroller dev kits or FPGAs so from Simulink to hardware is also attractive for people who are not into that stuff. I myself never used MATLAB beyond university.
reddit_user_number_9@reddit
Matlab has a simpler syntax. If you are not going to use a Python library, you can do more things while writing less code that is more direct in the sense your code looks like the mathematical equations you would write on paper.
ingframin@reddit
First of all, the target audience of Matlab is engineers that are not doing software as core business. They do actual engineering, like calculating structural integrity, microwave circuits, antennas, control systems, electrical lines... They are not necessarily comfortable with software engineering practices and patterns. Convenience comes before everything in those cases. This translates into the tool boxes. The tool boxes are the main reason why many people stick to Matlab. SISOTool, Microwave Toolbox, 5GNR toolbox, filter design, etc... Those things are not available for Python. You can simulate pretty much everything relying on proven fast models.
Also speed: the Matlab environmnet is clunky af but when it comes to calculations, it's very hard to beat it in speed.
Finally, another major convenience is that you can compile your code to generate either C programs for some DSPs or FPGA cores directly. There is no such thing in Python.
lone_warrior1310@reddit
For the same reason Mainframe is still is use !
szayl@reddit
The better question would be why they're using MATLAB instead of Julia.
bernasIST@reddit
Simulink
nlcircle@reddit
I don’t think the claim that engineers prefer one over the other. MATLAB has much better documentation, Python is catching up, has a wide user-base adding packages left and right and is free. Take your pick! In my company we all had MATLAB, paid by the organisation. As a PhD researcher I’m self-funded so Python suddenly becomes attractive.
ejgl001@reddit
My guess is (1) many engineers studied MATLAB (first or maybe only), (2) they already have a sizeable codebase in MATLAB
Personally I much prefer Python but I think I am weird. A big thing for me is "syntax" and how the language looks and feels. What I mean by that is that in MATLAB many times it feels you need to hack things for them to work, and I dislike that, but I feel most people care first and foremost that sth works (no matter how ugly)
But in fairness, I may be somewhat autistic (at least my friends and colleagues seem to think so)
serverhorror@reddit
We have a sinila situation with SAS and R.
Reasons are, mostly, non-technical. Regulatory bodies, often, consider the commercial solution to be more reliable. So a submission to regulatory bodies has an easier path to acceptance if you use the commercial tools (where the companies bumped a lot of money into lobbying, so that's a fact now and it has nothing to do with technical reasoning - but it is already changing)
Human-Ad-8100@reddit
Just by your statement about Matlab being much slower than Python, I can tell you never used Matlab for serious stuff. Matlab is much more efficient and faster when dealing with matrices.
JJvH91@reddit
Because it was what they were taught in uni and never bothered to learn anything else
Desperate_Cold6274@reddit
Perhaps this question should be asked also in r/matlab? I think it would be perfectly legit to ask the users there why they didn’t switch.
TheQxy@reddit
Firstly, syntax is way better and easier to read. Secondly, Simulink, there is no Python equivalent, open-source equivalents don't work as well (maybe different now, haven't used it for years). Thirdly, the super extensive packages. Fourthly, free licence for students for all packages. For example, I could use an extremely powerful computer vision package for school projects.
All in all, the licence cost is just not that big of an expense for businesses compared to the value you get out of it.
maltedcoffee@reddit
We just had a contractor move a transportation model from MATLAB to Python with a Pandas/Numpy stack and while they did not do much in the way of optimization it now takes several times as long to run our model. Hopefully I can pull some magic now that it’s in a programming language i know but yeah, not fun.
pwang99@reddit
Sorry to hear that... I wonder if they're doing some "naive" things in the port, which naturally gets optimized in MATLAB but which cause a bunch of memory duplication or whatnot in the Python code...
You can also look at things like Numba to do some JIT for loops, etc. that might exist in some functions.
I can also imagine that with a transportation model you might be doing a variety of optimization algorithms, for which there are specific libraries (e.g. CVX) with Python bindings.
togno99@reddit
This right here is exactly one of the reasons.
Most engineers don’t want to deal with all of this, they don’t want to spend hours making something quicker because of some memory stuff that isn’t directly related to the efficiency of the algorithm.
And in that Matlab is very superior.
TheBlackCat13@reddit
Yeah, I have had the displeasure of having to do that. The fully idiomatic python code was always several times faster and many, many times shorter, but it did require a nearly complete rewrite.
nickbob00@reddit
They learnt MATLAB way back when in uni as did their colleagues. Their company/team has lots of existing MATLAB codebases.
It's really only the last 15 years or so that university teaching in engineering, physical sciences and similar moved from MATLAB towards python, and there are still a lot of people learning MATLAB. It's free or negligibly cheap for universities.
There are some engineering fields where the specialised MATLAB toolboxes are actually really good and there is not much of a well polished open source alternative.
The only other common advantages I've seen of matlab over python is that python packaging is still kinda a mess (try telling a nontechnical colleague they just have to download anaconda and set up an environment and some package respositories), putting together a simple GUI, and that MATLAB can relatively easily "compile" your code to an exe installer. In my company all the calibration/test setups used by technicians run on MATLAB applications.
PseudoVanilla@reddit
Package management and version control. This is huge. When you have engineers developing internal tools to solve technical challenges you don’t want them to bother with conflicting versions of Python packages
angeAnonyme@reddit
A friend of mine works at Matlab and when asked, his answer was: Matlab is a reliable company that responds to customers requests extremely fast. A company can not rely on some dude that wrote some github project to run his program, that might break one day.
cashMoney5150@reddit
Is there something that matlab does exclusively, like some proprietary tech, that cant be done on python/anaconda ?
Unlucky-Work3678@reddit
There are off the shelf tool boxes with off the shelf instructions to do professional level stuff in Marla's, if you have the money.
With python, everything serious or truly "professional" is not even openly available.
victorc25@reddit
No, we don’t. It’s universities that still use MATLAB
Acceptable_Pea7103@reddit
It’s simulations that Python has nearly no alternative
AhoyPromenade@reddit
I’m from an academic background, did a PhD partly in an engineering department, and transitioned away from MATLAB in 2014 so have some experience.
What you’re missing is that MATLAB is not just the language and interpreter which are comparable to Python. You can knock up GUIs very easily. You can generate ISO standard C code for embedded devices from Simulink. There are toolboxes for various things that are not easily replaceable with equivalent Python modules, which means rewriting code.
Pretend-Economics758@reddit
Matlab’s speed is comparable to C speed due to just in time compilation
libraries that support engineering, cfd, numerical simulations the speed is important
In Python you have to use numba ‘s .jit compiler to achieve similar speeds, but it requires you to have some workarounds for certain library functions thay are not supported by numba, so matlab is much easier.
DrWazzup@reddit
It’s because of the interactive plot editing tool. That’s the one thing missing in Python.
nicalitz@reddit
Simulink, Stateflow, and Simscape
Impossible_Ad_3146@reddit
No one prefers this
pmmeuranimetiddies@reddit
I am an ME that has had to learn to program for data analysis (and also just grew up with a bit of self-taught programming), a lot of the features that make Matlab undesriable to programmers are exactly why MEs like it.
The appeal of MATLAB is that it comes out of the box with 99% of the features an ME will ever need. If the workplace is paying for it who cares how much it costs? In my personal opinion matrix3 = matrix2 * matrix1' is easier to read and type than matrix3 = torch.matmul(matrix2, torch.t(matrix1)).
If I'm setting up a convolutional neural network, sure, the ability to import PyTorch is useful, but I don't really do that. So if my employer is going to provide matlab, why not? I am not a software developer, why should I care about the customizability, security, and stability if MATLAB has a lower barrier to entry and does the job fine?
I made the switch to python basically because my current employer doesn't pay for MATLAB. I drew on some experience from my Master's degree where I was doing some data analysis that needed python specific libraries, but it took moving to an employer that does everything in excel for me to make the switch to python.
Bach4Ants@reddit
I'm an ME turned SWE, so I prefer Python because it's just so much more flexible in terms of how and where it can be run, virtual environments, etc. But that flexibility comes at the cost of complexity and cognitive overhead. I think some people just don't want to be "hackers"--writing code is just a necessary part of the job, and it's potentially easier if all you need to do is spin up one self-contained app, write/run your code, and get on with the rest of the project.
YesAndAlsoThat@reddit
Exactly. Every Matlab thing I've done is "running a few times, get your answer, and never touch it again"
YesAndAlsoThat@reddit
1) it just works. Without having to chase down libraries or risk breaking your install by pip installing the wrong thing. Or trying to seed multiple venvs one for each project...
2) I can quickly graph something and it works out of the box.
3) with a little more effort, I can make GUIs to help me review or manipulate data, almost out of the box.
arcticfox@reddit
Why are computational physicists still using Fortran?
Allmyownviews1@reddit
They were trained at college with it and the functions in matlab don’t have issues with library version conflicts or dedicated libraries.
torsknod@reddit
Because Python provides only a fraction of the features of MatLab? How do you replace all the toolboxes and especially SimuLink and SimScape with the pre-certified workflows for functional safety related industry standards?
FitBoog@reddit
I switched to Python in 2013. Never looked back.
Born-Sheepherder-270@reddit
matlab has various in built functions and toolbox
Dizzy-Set-8479@reddit
yeah i got a friend who is and expert in matlab, there used to be a time that every algorithm that needed to work with numbers and matrix were done in matlab, early machine learning, and Ai algorithms were done in this, you will find tons of toolboxes for computer vision and calibration, there is other tools for photovoltaics systems, and electrical, that doesnt have counterparts in python yet. also there is bad linux support, i know he GNU Octave exist, but it isnt a full implementation, nor is open source, to finish there is clause that if you prirate matlab and release somenthing you could be sued.
Zeroflops@reddit
Work in a Fortune 500 company with a ton or engineers. I could probably count the number of people using Matlab on one hand.
Matlab once had a unique niche it filled but as people became comfortable with other languages the cost of Matlab just wasn’t worth it.
Now even when someone prototypes something in Matlab, it’s rewritten when it moves to production.
Micketeer@reddit
A few years back a had meeting with a few Volvo bosses and a few other local companies being us to stop teaching matlab and switch to python at my uni. Their main motivation was not to pay the horrendous license cost considering most of the usage was engineers hogging license only to use it as a glorified calculator.
(We have since a couple of years switched all our programs over to teaching only python instead of matlab). Good riddance i say!
Cyclone4096@reddit
Simulink, filter designer, DSP toolbox all these are tools/libraries that I have with MATLAB. I’m sure other industries have similar tools available in MATLAB. Note I am not writing efficient code that need to be maintained, just running some one off experiments. If I need to run the same thing over and over again efficiently, I will port the code to Python.
mountaingator91@reddit
Because they teach it in engineering school
hi65435@reddit
I never got comfortable around MATLAB but since I'm a Physicist by education I bought myself a MAPLE Home license for 300 bucks a few years ago. Sure, in Years of Experience I should be more comfortable with Python and the tooling is supposed to be better. Also since it's a real programming language, right?
But the truth is, for anything mathematical I'm 1000x more productive with MAPLE as the weird tricks I really need are etched into my brain. I use it only rarely and not even for integrals or anything but also performance-wise it's at least 10x faster than some sort of Jupyter with a symbolic math engine. (After all, it's not 2010 anymore :))
I think people spent way too much time worrying about the perfect programming language in the last decade
MathmoKiwi@reddit
For quick and dirty stuff you're doing day to day then Matlab is light years ahead of Python.
Just like how many Statisticians prefer R over Python for day to day use.
HieuandHieu@reddit
The Simulink is the Gem. It' not just about you're building AI model, or do some separated stuff. It's about you connect all modules, form the entire system, hardware and software, AI models, camera, sensors, dynamical control system such as motor, hydraulic system... You cannot do it well in python, or spend alot of resources. Maybe you will never see it in AI engineering field. But in Robotics field, there are alot of subfield like AI, Embedded, Mechanical, Electrical,... With Matlab and Simulink you can quickly design, build entire system for testing all at once, not just test for each module separately.
kkiran@reddit
Our mechanical engineer who cannot code or know Python swears by MATLAB since he got a free trial license and copilot that helped him immensely.
I am in charge of implementing his integrations. So tempted to explore Python (for his regression models for forecasting) but I simply do not have the time :( MATLAB license structure is atrocious! We are still early in the game at negotiation with Mathworks.
Ground-flyer@reddit
It has really good documentation You don't have to make decisions on what libraries to use as all of it tends to work together You learned it in school It has a really good out of the box plotting tool
MPGaming9000@reddit
Just wait until you find out that most scientists and researchers are still passing around cursed CSV files instead of Databases and other modern ways of storing and accessing data.
anderspe@reddit
At my Company a division replaced Matlab with Julia and use AI to help the conversation. I don’t know why julia and not Python. Reson to move away from Matlab was price of licens.
CartographerGold3168@reddit
there are well established signal processing and statistics models that have been working for years, and they were used in schools. no one wants to take risk for a no name library built by no one
Repulsive-Bathroom42@reddit
When someone says 'i get it" they don't actually get it. They project their shit one someone else.
Simusid@reddit
I work with over 1000 engineers and scientists. Most of the older generation (over 45) are "you'll pry matlab from my cold dead hands". A lot of it is familiarity obviously, they've used it for decades. A lot of it is vertical integration, it's part and parcel to hundreds of internal workflows and some external products. A lot of it is lack of adaptability, not everyone wants to learn a new language, inertia. Also laziness; we have a full site license, all toolboxes on every network and our IT folks know how to install it everywhere. And on the flip side, I know people that spent a year trying to get a fully patched and compliant system running conda with GPUs visible to tensorflow. It sounds easy but it's not.
Maws7140@reddit
In college right now and all my engineering friends are being forced to learn matlab instead of python🤦🏿
holistic-engine@reddit
One word: Contractual support
Why do huge corporations choose the clunky and non ergonomic software system that cost thousands of dollar instead of using open source? Because with paid software you almost always get something akin to IT support.
And also, salespeople are good at their job
willard_dillard@reddit
100% agree, but at least it's not LabView. F#*k national instruments for that abomination.
lzwzli@reddit
What doesn't seem to be mentioned here is how to get support for one vs. the other. With Matlab, or any paid software, you know your first stop for support is the company. And usually, you can get a resolution. Or at least, you know they will be responsible for finding a resolution. With open source, it's Google, or Reddit and you don't know how authoritative whoever is providing a suggestion is.
Redhat built a billion dollar business around providing support for Linux.
An engineer that has a stronger software background may gravitate towards Python due to all the reasons you mentioned. Throughtout the years, they've figured out how to navigate open source support.
An engineer that has less software background, that uses the software as a means to an end will care less about open source or not. They use the tool that they're familiar with and has wide industry adoption and that they can get immediate support whenever they need, and Matlab fills that need.
Btw, OP sounds like they have an issue with Matlab and I wonder why.
deltav9@reddit
I liked seeing all the variables on the right hand side when I used to code in MATLAB
TanLine_Knight@reddit
For me, MATLAB was just part of my degree so I naturally picked up on it. There are also a lot of companies that just have MATLAB too integrated in their prod systems to switch. But at least my uni is moving away from MATLAB to Python
11markus04@reddit
They don’t. It’s just a thing used in Universities (from my experience).
Hodiern-Al@reddit
I think it’s a combination of
Victor_Korchnoi@reddit
My program has years of legacy Matlab code. Moving on my existing program would be a nightmare.
When starting a new program, I know that every engineer on my team knows how to use Matlab.
I don’t personally pay the cost of the Matlab licenses, so I don’t particularly care about the cost of the licenses.
Change is scary and bad.
MathMXC@reddit
I haven't seen the top comments mention simulink yet. It is one of the top automation/control softwares out there and is used by a couple major automotive brands and other machine shop.
Also Matlab can be highly performant in the right hands
New-Watercress1717@reddit
Most are trained in Matlab in school, its what they are good at; apparently libraries like numpy, scipy and matplotlib where written to imitate Matlab functionality in python.
Apparently there where other communities trying to Matlab in other interrupted languages, python only took off due to how good it was for c-extensions.
suedepaid@reddit
A big one that I haven’t seen mentioned is security posture.
MATLAB ships a fully functional set of tools that are vettable by a Security team and “just work” out-of-the-box. They have security engineers on-staff that my program folks can talk to. They don’t have complicated supply-chain attacks.
All of that solves a large headache for companies that have strong cybersecurity needs.
mattrad2@reddit
Closed source isn’t always a negative. The quality and documentation of Matlab’s built-in is a higher bar than a lot of equivalent python modules. Also, simulink.
VLM52@reddit
Depends on the industry and the company. Most places I've worked at have been very python heavy over Matlab. There is something to be said about simulink though...
punchki@reddit
I think a huge part of it is simulink, being a go to control system modeling tool for many engineers.
lotus-reddit@reddit
MATLAB has probably some of the most comprehensive simulation and modeling toolkits that aren't comparably available in open source. It's relatively cheap (on a company scale), and is actively maintained. This is why engineers, who are in that niche, use it and it's why people still teach it to engineering students. Then, that effect of already knowing MATLAB makes people want to continue using it for other projects.
You have to understand that while these reasons
are nice to have, most people are largely driven to a language with an ecosystem most appropriate for their work. This is particularly true for Python too!
With that being said, AFAIK, there is a push away from MATLAB at both the academic and industry level. Building the necessary software will take a lot of time and money, though.
FrickinLazerBeams@reddit
Well written Matlab and well written python are usually about the same speed, although there are exceptions for both. In either case if you really need performance, you know what you need to do.
maorfarid@reddit (OP)
Those trends make total sense, I didn’t know that academy moves away form Matlab towards Python. Super interesting, thanks for sharing!
FrickinLazerBeams@reddit
It's pointless to answer a question like this here. Any real answer will be swarmed with religious zealots explaining why python is superior in all ways.
The basic fact is that python and Matlab are both great but depending on your environment there are very good reasons to prefer one or the other. You use the tool for the job.
wye_naught@reddit
Former semiconductor process development engineer here and I can say that Python was definitely preferred over Matlab. Jupyter Notebooks are standard now. Good libraries for data analytics and image analysis. I'm not sure what people use now but I suspect Python with Jupyter Notebooks is still the most popular.
_itsAdoozy_@reddit
Damn and I'm out here needing to learn FORTRAN so I can use a piece of standard software for my work.
TheOnlyBliebervik@reddit
Do you use PSCAD? It's all Fortran
Thx ChatGPT, for making me the local Fortran god
_itsAdoozy_@reddit
Never heard of it, what's it for?
maorfarid@reddit (OP)
😄😄
hainguyenac@reddit
Simulink, the answer is always simulink.
Vxctn@reddit
Because historical tech debt.
Flimsy_Ad_5911@reddit
Beautiful (vectorization like numpy) and simple syntax for linear algebra and matrix manipulation. It's not great for text processing or plotting (as of 10 years ago when I moved to python because my work is now text heavy)
tRfalcore@reddit
Think my brother can program his FPG's with his matlab code
_Denizen_@reddit
When you consider that 2 annual MATLAB licenses could pay for 1 additional engineer, it quickly becomes clear that there are two types of engineer who prefer MATLAB: the engineer who genuinely needs MATLAB unique features and don't do any higher level coding; and the engineer who will be replaced by a python developer who can deliver better applications far cheaper.
Source: I'm an engineer who has saved £100ks for my employer by pushing for a shift away from MATLAB for coding that can be done in python.
electric_machinery@reddit
Why does Linus still write C code? He's got an awful lot of time invested in his tools and product. It's kind of silly to shame people for using the tool they're more efficient in.
Motox2019@reddit
The simple reason I’d argue is matlab, specifically mathworks itself, often provides educational institutions with either extremely discounted or even free licenses. This leads to early adoption and familiarity in academia which then transfers to industry. The other reason being legacy code. Some companies may have been using it for years due to argument 1, likely before python became as mainstream as it is now, and at this point are far too deep into the ecosystem to justify switching.
By contrast, python is not taught in engineering even today (though I think it should be) and focuses on C as an intro to programming and then matlab/octave from there forward.
At the end of the day, it’s business so mathworks will do what it can to keep folks using its software and incentivizing that early adoption, even if it seems like common sense to learn something free and more general.
R3D3-1@reddit
... and then you work at a company and have to deal with functions randomly not being available and requiring you to buy a toolkit that you otherwise don't need.
monkeysknowledge@reddit
Yeah MATLAB sucks.
SecondEngineer@reddit
MATLAB is for certain data analysis, Python is for some scripting and basic experimental stuff. Rust is for optimized programs.
So you make a program in Rust, automate running it with Python, then analyze the results in MATLAB.
cudmore@reddit
Hey OP, thanks for the question and to all the community responses.
Dabbled in Matlab for a project in 1995 (MS computer science), then switched to Igor Pro (PhD neuroscience), check it out :) … !!!
Been working in Python 100% since about 2019.
I work mostly off NIH grants. The NIH, among many other things, is really pushing for open science for transparency and reproducibility. Python is perfect for this!
Yet, the number of scientific labs and their publications that still use the proprietary and closed source solution of Matlab is shocking and pervasive. Because of many of the reasons explained in these comments.
When I review grants/manuscripts that still use Matlab I always voice concern and usually get considered a techie or something.
Matlab gets the job done but costs $$$. The Python ecosystem in the 90’s and 2000’s would hold your research back.
Today, Python should be the choice because it is incredible well documented and the scientific ecosystem of packages is growing super fast.
I consider folks in research labs that still use Matlab to be stuck in the 90’s. Yes, disrespect to my colleagues!
Lots more to say!
aqjo@reddit
Probably a question for the matlab subreddit.
I used matlab during my PhD, but never loved it (though I did buy a mug).
But their support is good, and I can see that being a contributing factor to people choosing it.
memerso160@reddit
I think the bigger hump is to justify using anything but excel for most engineers
virtualadept@reddit
Engineers are trained on it.
Companies that use MATLAB have support contracts, so rather than work out how to do something in Python they can ping their support reps to get help.
More generally (i.e., not just the field of engineering), support contracts mean someone can get sued if something goes sideways (case in point, RHEL and RHAS - you find those in industry because of those licensing agreements).
Less generally, one does not wonder if there is a MATLAB feature to do something in engineering; there usually is. Whether or not there is something in the Python ecosystem that does something in the field of engineering is not a sure thing (and, depending on the project and funding thereof, there may not be time or authorization to write something that does it).
ForesterLC@reddit
I didn't like Matlab in university and I don't like it now. I use Python for pretty much everything. Any library that needs to be fast is usually a wrapper for C.
TheIsletOfLangerhans@reddit
It's Simulink
It's always Simulink
UltraPoci@reddit
The real question is why so few people use Julia :(
TheBlackCat13@reddit
It has all the disadvantages of both languages
ali_lattif@reddit
The only right answer is simulink
mayhem93@reddit
Wild to see a case where python is the fast one in comparison.
TheBlackCat13@reddit
That is pretty common these days. Matlab was traditionally faster at matrix and frequency domain operations. But python has largely caught up on matrix operations, and has faster frequency domain functions. And python has always been faster at other things like file I/O, string manipulation, etc.
Matlab will still be faster if you are doing pure math. But for most real world stuff today python will be roughly as fast if not faster.
sayakm330@reddit
Lot of engineering toolboxes along with access to simulink and other model building features.
ex4channer@reddit
Have you heard of GNU/Octave? It's basically a free and open source implementation of Matlab which allows for convenience in linear algebra operations like Matlab does and is also very comfy. I think the syntax for matrix and vector operations is much cleaner than using Python with numpy and this migh be one reason. Also while learning Matlab you immediately get to computation whereas when you learn Python you first have to learn general purpose programming and then numpy or scipy package on top of it, so it's slower to get going in the beginning.
TheBlackCat13@reddit
Octave has the disadvantage that it is always playing catch-up. It can't really innovate without breaking compatibility with Matlab. So it can never be as good as Matlab, by design.
Python, in contrast, is free to innovate, and has. This has left Matlab playing catch-up in many areas.
FreakinLazrBeam@reddit
Math works has positioned it self in automotive engineering as the only game in town because you’re able to make MISRA code from Simulink and the only way to make calibratable software easily for development and testing. As well as having the AutoSAR standard built in.
quantinuum@reddit
Engineers come at it with different requirements. They don’t want a very open ended language that’s up for you to set up with your IDE and your particular configs and so on, ready for whatever type of development that you want to do.
They want to solve their engineering problems, period. And for many specific engineering applications, Matlab has spent a lot of efforts making it very powerful and straightforward. Add to that abstracting away all of the more dev-ish stuff and setup, and providing an integrated IDE that makes their life easy. Add to that familiarity, since it’s established in the field. Hell, even add to that that raw Matlab code is way faster than raw Python code, which may come in handy in many of their calc-heavy applications (I’ve seen a couple examples).
Code is a means to an end. But developers spend their lives in the “means”, so they care a lot about all the details. Engineers just want the spectrogram of whatever signal yada yada or to get a nice 3d plot of some weird stuff that is a two-liner in Matlab, which also gives them straight documentation examples of how to do it (and if not, I bet support will help them). No fuzzing about how do I set up an environment, why is this jupyter notebook not working, how many layers of python and versioning and libraries and open-source messes I have to weed through to get to something that works for my use case.
Zame012@reddit
My previous company used it because it’s an all in one platform and doesn’t really have the need or use for outside packages like Python basically requires. Less potential for security issues than with public Python packages. Plus IMO MATLAB is similar in syntax to Python anyways.
SuperSooty@reddit
I'm in the wrong sub but I'd push matlab users to Julia over Python
phxees@reddit
Before I learned Python I used MATLAB for image processing and it seemed like the right tool for the job at the time (better than C#). Now, I’d probably rewrite everything in Python over the weekend.
Sometimes you just need to get a task done.
Ok_Tiger_3169@reddit
Outside of my wheelhouse, but my coworkers who do DSP and 5g stuff says it has better facilities for that.
standardtrickyness1@reddit
The matlab client is super good can step can change variables during debuging super intuitive etc.
TheBlackCat13@reddit
Any even semi modern python IDE can do that.
metadatame@reddit
Switched in 2008 and didn't look back
wildpantz@reddit
EE here, in my case I'd say Simulink is a pretty great tool. Other than that, I hate MATLAB. Most people end up using 1% of it and download tens of gigabytes just so they could write a simple script they could probably write faster and make it work better in Python anyway. Don't get me wrong, there are some toolboxes that are just built extremely well and it's much simpler working with them than designing everything on your own, then debugging it, testing, etc. etc.
For my final paper, I did everything in Python and only confirmed the results in Simulink afterwards, just to make sure my calculations were correct.
It's kinda pointless arguing over this on matlab sub as they're all high and mighty over it and you'll get downvoted to hell for any critique towards it.
--prism@reddit
Primarily the toolboxes I would say. Some the proprietary stuff is super helpful.
Osrai@reddit
Yeah, MATLAB was provided at university for us in the UK. I used it for statistics. It was the default for the engineering boys. I used Maple for my maths degree.
sjollo@reddit
I use both at work for signal processing. Python is free and supports more paradigms as a programming language but is not a Matlab replacement by itself. I personally prefer python with numpy / scipy and co, but I think Matlab is still widespread because of: 1.It's fast and very optimized for number crunching 2. Technical debt : one can't rewrite 10 years of code written by dozens of other team members. 3. Powerful toolboxes, such as simulink, ai and language generation...
oberguga@reddit
It has integration with simulink which is the best simulation toolkit with hundreds verified models, supporting different solvers and code generators. And aloso it's polished GUI app. Which means I can experiment with model instantly without making boiler plates or thinking too much about what library to use, what version of python I need and how exactly I should describe my model to actually simulate it, also how to plot results. I can just start assemble my model , get some results almost in no time and if I need some specific things I can use matlab to extend simulink. And all that require only knowledge of matlab, simulink basics and my problem, for python i need all libraries that i need like numpy, pyplot, pandas, something to actually simulate things, if i want interactive model I also need some gui lib etc and after all this on top of actually complicated stuff like my initial problem. Engineers usually payed not for learning libraries, but for getting things done fast and correct so simulink fit in that niche perfectly.
zjm555@reddit
Engineers don't. Researchers sometimes do, because their university gave them a license for it 20 years ago and it's what they're used to.
No_Departure_1878@reddit
I do not get it, why are you asking that here? Isn't there a matlab subredit where you can ask that?
rover_G@reddit
It’s all about being first to market and gaining a foothold. MatLab had its first public release in 1984 and did an effective job of becoming the standard for classical engineering.
Python was not released until 1994 and the popular matrix library numpy didn’t release until 2006.
22Maxx@reddit
As someone who has been using both, there are actually some good reasons why:
c126@reddit
I always try to use FOSS when I can
Northzen@reddit
Ignoring all other arguments about cash, legacy, teaching tradition etc (all of them are true and valid) Matlab makes it really simple to work with matrix. It is native language type. Nympy produces verbose code and far from being compact and straightforward. This is why I would prefer Julia.
AlbanySteamedHams@reddit
I think part of it has to do with just cognitive load. The more domain specific knowledge someone has, they less inclined they are to try to optimize coding workflows (which is a specific knowledge domain of its own). They care about the mass matrix and getting the math right. Other concerns take a back seat.
What I really want to know is why they use notepad++ to view their plain text files.
herocoding@reddit
Depending in use-cases, industry and licensing you will get great support and immediate support in case of questins, problems or just support.
There are really powerful modules, plugins, and tool chains.
Think about Hardware-In-The-Loop use-cases.
Code-generators of Matlab, Simulink and modules/plugins are really powerful, supporting many ecosystems from SingleBoardComputers, FPGAs, NPUs/TPUs, GPUs.
mokus603@reddit
Because they can’t code and afraid to change. They don’t really understand what they are doing and very comfortable in the Matlab environment because they had a class at uni.
brighterdays07@reddit
Could be legacy stuff + relationship built with Mathworks business support?
Also, many businesses lack the cybersecurity resources to properly scan and vet open-source Python libraries.
BigTomBombadil@reddit
In my experience it’s an “academic language”. When I was in engineering school, it was the only programming language we were taught (this was chemical engineering, electrical engineering and CA obviously learned others).
Then once I was working as a backend/python developer a decade later, I worked with alongside some atmospheric science PhDs, and all they knew was matlab so I’d have to port their algorithms to python and make them production ready.
So like the other commenter said, seems like matlab did something (likely funding, donating and hand shaking) to become the main language taught in stem classes
IncandescentWallaby@reddit
Many engineers had Matlab and Simulink forced into them in school. Python was not really an option in many degrees.
Lots of places have a couple of decades of tooling built in Matlab. Matlab also has entire toolboxes that are rather solid. The aerospace toolbox is one that I haven’t seen mirrored in Python for professional use.
Simulink is another kit that doesn’t have much competition. As much as I hate the autocoding of Matlab, I have used it to write controls software in C++ as well as VHDL.
While Matlab is sadly wasted on drawing pictures and data analysis, it has functions that are hard to replace.
Python also has more of a learning curve for people that literally never coded before. This calls back to the amount of Matlab pushed onto the non software degrees. You come out of school knowing Matlab like it or not.
sinsworth@reddit
For businesses it's probably a combination of vendor lock-in and corporate support. In academic settings it's mostly just inertia, at least from what I've seen.
OutrageousBanana8424@reddit
Many engineers still use Visual Basic to control instruments and process data. Why? Because its a tool they know. That's it.
MischievousQuanar@reddit
They know it and don’t know python. If you were to adopt every single new and improved tool, you would spend all your time learning tools, not working. Rust is better in a lot of ways than c++, but development of the linux kernel is still mostly done in c languages. The developers know it, and are confident in their ability to work with it. That’s about it.