4 ms·
I've always preferred MATLAB to Python as the more engineer-friendly programming language. The interface was a plus as well. That being said, given the sheer am
by wallwart 6y ago
I've always preferred MATLAB to Python as the more engineer-friendly programming language. The interface was a plus as well. That being said, given the sheer amount of scientific libraries for Python and universities moving towards it as well, I'm wondering if the effort to maintain Octave is worth it.
One use for it could definitely be running older MATLAB scripts that have deprecated language features. Those were a real pain to make work again.
- tpoacher 6y agoIn my opinion it is absolutely 100% worth "developing" Octave (the word 'maintain' makes it sound like it's an otherwise static project). The improvements from 3 to 4 were massive. The improvements from 4 to 5 equally so. I can't wait to try 6. In any case, it is definitely not just a tool for running 'old matlab scripts'. It is a beautiful language and environment in its own right, and if academia manages to wake up at some point they would invest in it for the open source environment that it is, in a way similar to python, and help it get even more amazing.
- mxcrossb 6y agoThere is still a lot of mathematics that there are matlab scripts for, and not python. I think it depends on how deep you dive into a particular area of course. But I think it’s definitely worth it.
- piokoch 6y agoStill doing many things in Python is a bit more laborious (no surprise and not a drawback of Python, it is general purpose language) than in Matlab/Octave. Plus learning curve is lower for Matlab/Octave, after long years of not using Matlab I've taken some ML course on Coursera that was using Octave and I was able to be productive very quickly.
- bayindirh 6y agoI use both Python and Octave and I can clearly say that one never replaces the other. For quick and dirty scientific PoC or obtaining ground truth, Octave/MATLAB is much better since it handles all the quirks of numerical programming with generally slow but with proven solutions. During development phase of my Ph.D., my professor would scribble something in MATLAB and send it to me with a note "for the given inputs, you should obtain this and that. Attached is the crude math". It was up to me to clean the math, convert it to C++ and make it blazingly fast while solving any attached small but hard problems. I still have a MATLAB license to test these ground truth scripts against my code.
- vonwoodson 6y agoI spent the majority of my career porting MATLAB to C++. We charge about $70 an hour ($200 billable man-hour) to do it. It’s a slow and arduous process. Often times the features that are running in Matlab needs some C++ library that prevents the sort of speed increase that you hoped to gain out of the C++ port, so a C++ reimplementation of the toolbox needs to be developed anyway; this loosing the benefit of the “verified“ toolbox. Python, on the other hand can be improved for performance piece-wise through tools like cython and swig. Of course, both offer a C interface, but I prefer the python one to MEX files for a variety of reasons. Also, you don’t have to pay a license to use python. (Same library implementation problems) Add a minimum, if the MATLAB folks would at least consider moving over to Octave we could illuminate some of the licensing fees, but... once performance matters, you’re still going to have to pay a full-time software engineer to port Octave code to make it performant.
- sgillen 6y agoI would be curious to know more about your firm and what customers you are serving? I feel like I have a lot of experience translating or communicating with weird things to MATLAB but I'm not sure who values this outside Academia.
- Dumbdo 6y agoA lot of companies in the (German) automobile industry rely heavily on Matlab and its toolboxes, so I'd assume that people like you are wanted there as well.
- srtjstjsj 6y agoI saddens me a bit to see someone with the ability to do that work being paid less than a 1st-year FAANG engineer. Unless it's freelance work you pick up in your excess time, or as a student job.
- billfruit 6y agoMATLAB seems ill condusive for structuring and organising code in a sane manner. It tends to give its users bad habits with respect to structuring code is what I observe. It seems to lack data structures that are quite pervasive in modern programming practise. Also python being a general purpose system brings its own benefits, one can easily hook up ones code to fetch or push data to databases and even easily scrape data of the web or extract/reparse/rectify/reformat poorly/complexly structured data before processing. And I find MATLAB not feature rich in terms of being able to manipulate tabular data in a relational DB like manner, that is querying/projecting/selecting rows/colums to find interesting facts.
- enriquto 6y agoOn the other hand, if all you need to do is to state and solve a few humongous linear systems, or a system of ordinary differential equations, or a partial differential equation, or compute the vibration modes of a solid shape, or perform an elasticity analysis, or simulate the absorption spectrum of a chemical compond, or find the numerical solution of a system of nonlinear equations, or optimize a function that has terms in both the spatial and the frequency domains, then Octave is definitely up to the task and will probably solve your problem out of the box in a handful of lines of code. In python/numpy, the sub-par linear solver will probably fail or be extremely slow on large linear systems (because the scipy developers are a bunch of anti-GPL fanatics that refuse to use the state of the art linear solvers because of license issues). But yes, you have nice strings and dictionaries at your fingertips; too bad they are completely useless for numerical computation.
- patrec 6y agoMatlab is much lower friction than python. You write a function, using nice linear algebra syntax. Already python is worse: you do a bit of import boilerplate and write linear algebra in a gimped notation. You call the function. Not so in python, where you have to import it first. You change the function definition, next call will be redefined function. In python you can try to do an interactive reload via third party software but chances are it won't work right since Guido apparently never considered this something worth designing properly (apart from matlab lots of "real" programming languages are much better at this, including erlang, common lisp and smalltalk). Your function runs too slow. You press a button and you see a color coded version of the code in your editor window and see instantly where the bottleneck is. In python you break out one of several crappy profilers. You want to save your results from your interactive exploration "save results.mat" -- done. In python there are various ways of saving stuff, which are either not general or slow or don't work between different versions. I haven't used matlab in years, but as an interactive environment for linear algebra it blew python out of the water and likely still does, even if it has a number of big shortcomings as a general purpose programming language (and probably a worse selection of libraries in quite a few numerical domains these days as well). This is particularly true if the people using it are not trained programmers.