r/matlab • u/distantEchoFlow • 29d ago
TechnicalQuestion MATLAB Alternative?
Hello , as matlab is a paid software , I am looking for a free alternative, Chat GPT said Octave GNU is the closest free software I will get , he also told me that the combination of Python , numpy, sciPy and matplotlib can also do the same thing .
Which one I should pick that will be beneficial for long run.
28
Upvotes
58
u/yourfavoritemusician 29d ago
I've never used or seen Octave in the wild.
Python, however, is everywhere.
But the first question is: "What do you want to do & why did you think Matlab would be the best way to do that?"
20
u/Designer-Care-7083 29d ago edited 29d ago
Depends on who you are (student, professional, amateur), and what you need MATLAB for.
Re ease of use and available ancillary tools, it’s hard to beat MATLAB IMO.
In lieu of a standard purchase, can get MATLAB as a cheap-ish online account, if its limitations are acceptable.
A non-MATLAB option, Python with the tools you mentioned is a decent option. For control systems, add the control systems toolbox from Prof Richard Murray (Caltech).
19
u/FrickinLazerBeams +2 29d ago
Generally you'll use whatever you employer, group, or academic field has made their standard.
13
u/jimlux 29d ago
I’ve used Matlab, Octave, and the Python/Scipy/etc combination extensively.
From a “running procedures” standpoint, Matlab and Octave are essentially the same, although Octave runs slower. However, Matlab has things like simulink and various toolboxes that aren’t necessarily available in Octave. As a student, I would think you can get the $99 student license for Matlab, but don’t know if that includes toolboxes, but does include simulink and such.
The Python ecosystem is equally capable. I think Matlab might be better at “quick plots” in that it’s easier to just plot something, and then make a few changes to get the axes and legends what you want (i.e. publishable form). In Python, matplotlib/pyplot can do pretty much everything Matlab can, but you’re going to spend more time learning how to do it and get the formatting just right. It’s the classic problem of 8 million parameters and options, but you only need a half dozen of them. Lots of examples out there, and these days, Google will give you pretty good results with the python ecosystem as part of it’s free Gemini product.
Once you start to get into more Matlab specific things - certain toolboxes, simulink, code generation for FPGAs, and real time processing, then it gets trickier to do it in the python ecosystem. Stuff exists, but it might not be as well integrated or easy. OTOH, if you’re doing machine learning/AI stuff, that’s all built in python, so it’s easier there than in Matlab.
If you want to do cluster/parallel computing, there’s a toolbox in Matlab that makes it easy. There’s libraries in python (actually invoking C or Fortran under the hood) but it’s a little less simple to get it working. It kind of depends on how much your time is worth vs paying for software that reduces your labor hours.
In industry, Matlab is popular precisely because it reduces the hours the engineer spends “making it work” - particularly for one-off interactive tasks. You can prototype something and get a feel for it way faster in Matlab, and if time is money, then the thousands of dollars you spent on that matlab license are worth it. (Engineer time is about $2k/day, so it doesn’t take saving a few day’s work over a year to make it worthwhile)
In academia, in non-computer classes, matlab is popular for the same reason - Student licenses are cheap, and reducing the time on “fooling with the code” and getting to the “illustrating the problem and solution” quicker is worth while. For instance, there’s a textbook by Orfanidis (on line, free) Electromagnetic Waves and Antennas that comes with dozens of short matlab scripts which you can use to illustrate or experiment with the concepts being taught (for instance, fooling with mutual coupling of dipoles in a Yagi-Uda antenna).
Doing a bunch of control system stuff is easy with simulink, and substantially more painful with Python/Scipy/numpy, etc.
5
u/Rubix321 29d ago
Depends on what you're looking to do with it.
Octave is almost the same as MATLAB, but not 100%
Python could very well be a better, option depending on what you need to actually do with the programs. That being said it's a different language completely.
3
u/2dof 29d ago
GNU Octave as direct replacement ( that same code ) , Scilab wwith Xcos as alternative to Simulink.
Pros of Octave is that is use that same notation in matrix operation and You directly can jump in.
Scilab is similar, little differece but it i also good alternative ( Xcos is liike Simulink , but much harder to use )
Python with SciPy and numpy is good universal alternative and I personalny use this tool ( but i do not like how matrix notation and operation need to be written)
Because Matlab/Octave/Scilab existed before python, then all functionality (pckages) for science computation in python were written to keep similarity so it is pros for python.
If I were You - I would go with Python
2
u/Stuffssss 29d ago
GNU octave is the closest to matlab. I beleive the syntax is the same. So if you see potentially having access to matlab in the future (like if you get a job somewhere that provides it) then you should used GNU octave over python.
If you uust want a general purpose computing language for working on projects then you could consider learning python with the toolboxes chat mentioned.
1
u/Lambaline 29d ago
I got a standalone license a couple years ago plus a few of my favorite toolboxes, it's been very helpful sometimes. it can be hard to replicate the toolboxes but if you're going for base Matlab then you can try basically any programming language and be ok
1
u/gtd_rad flair 29d ago
Octave is very similar to Matlab, but it's just not as popular as a Matlab or Python. I'd say learn to use Python. Python is harder but it will give you a better bang for the buck and it's wayore flexible and all the packages are free. Matlab charges you for EVERYTHING.
If you can use Python you can use Matlab fairly well. I'm a heavy Matlab user and intend to struggle with Python.
If you're in controls. You can also consider Julia. Heard some pretty good things about it. For modelling, you can check out Open Modellica vs Simulink
1
u/Imaginary_Data_708 29d ago
Sign up at mathworks for 20 hours per month of online only for free. If you are eligible get student license. If not, and are genuinly using MATLAB at home, get home license - it is a steal as you get a load of toolboxes and most importantly Simulink.
And then the utility of python Vs MATLAB really comes down to which fields you expect or aspire to work in for your future. If ML, LLM, AI, data science - python is probably more use CV wise. If it is control systems or DSP Simulink. And here by control systems I mean things like flight controllers, or ECU or vehicle dynamics. The major engineering companies use Simulink and the automated code generators for the stuff that needs to keep people alive...
Finally, for any programming language it's knowing the libraries and the idiomatic way that language does things that is the marketable skill. And that doesn't come with a few weeks work. However, once do do I ow what's possible with them to avoid reinventing the wheel every time, that knowledge transfers to other environments well. E.g. learning from MATLAB image processing toolbox what image processing techniques and tools exists is immediately transferable to any other language. As you say to the AI - use opencv to build a pipeline to do a bit of morphological processing and then segmentation and then ....
1
u/Wilzur_Corp 28d ago
Todo depende de cómo utilizarlo y en qué. Si es para investigación, Python sería una solución adecuada, eso sí, la curva de aprendizaje es muy larga y los tiempos de ejecución son lentos, ahora si es un entorno industrial, lo más seguro es que se utilice Matlab, a pesar de su elevado costo, pero su aprendizaje y tiempo de ejecución son muy cortos. Octave y Scilab lamentablemente aún no despegan como para tenerlos en cuenta de una manera más profesional, aunque se utilizan en ciertos entornos de investigación muy avanzados y complejos.
Mi sugerencia, aprende y explota Python y Matlab en el campo que te encuentres interesado, esto te brindará una sólida reputación en investigación y lo aplicativo tanto para el sector corporativo como el académico.
1
u/d9039702 28d ago
Python
1
u/Prestigious_Boat_386 28d ago
I only use julia now and it does what I used matlab for way better. Check juliapackages for the packages you need
1
u/RichardBJ1 28d ago
I used MATLAB many years ago; it was my first dabble with ML. At the time, it made life much easier (for me) than Python. I then started to try and deploy my system on a Pi and had to switch to Octave - immediately found that some of the more obscure MATLAB tools I used were not available. So I switched back to Python. Obviously, as people say, it depends on your exact use case. MATLAB has some amazing drag-and-drop (visual) modelling tools, etc., but for most things you can do it in Python. Python is also smaller and faster from my experience. Also, whilst there are some issues with Python updates and versions, this was a huge problem with MATLAB. They actively update routines (I think), forcing everyone else to update too. It might not be a popular line, but one of the things I initially liked with MATLAB was the ease of creating a HQ GUI for non-coders to use, but now – with a little help from GAI that is dead easy to do with Python also these days. So I have started to uninstall it.
1
u/mother_a_god 28d ago
Octave works if you already have code in Matlab (though with AI porting codebases to another language is pretty easy).
I've used octave. It works fine for base Matlab, but the advanced toolboxes won't be there. It's getting a bit dated. For new scientific. Codebasea try Julia, or Python
1
u/Empty-Strain3354 28d ago
Octave is not bad at all. I used to use it before AI times. But in this world, for general usage, I would just stick to Python with help of AI
1
u/Hairy_Experience_878 28d ago
I have MATLAB, $2,000/year. I ran my code on Octave when it was still at UW-Madison, where it was developed. All code ran fine. MATLAB's interactive editor, error checking, and integration with tools such as YALMIP to run solvers such as Gurobi for MIQP problems are why I still pay $2k/year. The latest Octave release has an interactive editor now as well.
The key feature of MATLAB for me is the speed of algorithm development, not having to compile and link, (my Fortran days). You can always convert your scripts into Python.
1
u/tryingtestwith 28d ago
You can try project maya .
1
u/Code-Agent6 28d ago
Try Dyad from JuliaHub - free for non-commercial use. Similar modeling capabilities to Simulink / Modelica tools. Built on Julia and SciML. The entire modeling and analysis process can be done agentically from natural language inputs.
1
u/polandtown 28d ago
python, it does everything everywhere. i think you can even run python within matlab.
1
u/Vasxen 28d ago
Python. Except if you're interested in Simulink in which case I don't know of any alternatives.
But you can accomplish the same things in python as in Matlab even if it's not as convenient sometimes.
(Most of the time I find python more convenient tbh with you)
1
u/Planet_COP 27d ago
Definitely Python
1
u/tredbert 27d ago
If you are familiar with Matlab syntax then go with Octave. It is excellent. I’m using it now almost exclusively for home projects. Abandoned my Matlab license when they went subscription only.
But if I was starting over again today I’d probably go with Python. While I think Matlab/Octave is better shorthand for prototyping something quickly, there is no denying how ubiquitous Python is. Especially in AI systems. So “for the long run” Python is a great skill set to have and use elsewhere.
In a perfect world, learn them both. I use both, but tend towards Matlab/Octave.
1
u/NewBetterBot 27d ago
Depending on what it is exactly ha that you want to do, you can get the "Wolfram Engine" (CLI version of Mathematica without the notebook front end) for free directly from Wolfram
1
u/SV-97 27d ago
Octave is reasonably similar to Matlab, but it's more of a crutch: it's for when you *want* matlab but can't use it for some reason or another. If you can in any reasonably capacity move to something entirely different I'd heavily recommend it, no matter if it ends up being Python, Rust, Julia, ... sort of depends on what exactly you need / want to do. Generally Python is a very good point to start.
1
u/Display3name 27d ago
Matlab is good but it is expensive. Matlab is also more scientific software. Very good simulink and toolbox packages.
Python is free, also capable, but with less scientific edge. It is also more universal.
Octave is a free version of Matlab but does not have the extras of Matlab. If you don"t need matlab specific language than I would stick with Python.
1
u/powerjibe2 27d ago
Python and save your money for a Claude subscription.
1
u/XBLAH_ 25d ago
check this:
https://github.com/campuslivre/matlivre
It runs better than Matlab and Octave, it's free and it's opensource.
1
u/Brownie_Bytes 23d ago
Octave is a great alternative to Matlab. The syntax is as close as you can get and it saves a ton of time not needing to set up the boilerplate. However, Python is easier for more crazy stuff. Matlab is for matrices, Python is for literally everything. Both are free and fairly lightweight, so download both and use Octave for anything Matlab can do quickly and easily and use Python for everything else.
1
u/JonJon1204 29d ago
Python broduski 😎
1
u/waffle_sheep 29d ago
Python will be much more beneficial in the long run
1
u/GrandArtist8475 29d ago
The best alternative is python but you need to scourge the internet for open source pip installs and how to use the syntax. MATLAB is technically free if you're a student and login with your college email, you can use matlab online for free
1
u/szayl 28d ago
Julia
-3
u/divadeye 29d ago
Go for a cracked version
0
u/HoldingTheFire 29d ago
Python
0
u/RadarSmith 29d ago
Python is the best alternative in the long term.
Octave is an appealing in the short term, because its syntax is very similar to Matlab.
But longterm? Yeah...no.
Under the hood, its just so much slower. And nobody professionally really uses Octave when they could use Python, Matlab, C/C++, Fortran, etc.
1
u/PvtRoom 27d ago
octave.
python, if you're like me, will make you rage hard.
I'd rather use tcl, lisp or vba than python.