r/Python • • Aug 05 '19

Python's response to MATLAB

Post image
4.3k Upvotes

372 comments sorted by

View all comments

7

u/okkshin Aug 05 '19

People on here seem to have completely forgotten about the roots and the diversity of programming in general. The response to the top comment even claims people who like Matlab aren't in general programmers!

Matlab was not designed for general programming, but numerical computation, the original purpose of programming and its dominant form until late 20th century.

Programmers are a diverse group, and engineers, physicists, mathematicians and computer scientists alike use Matlab for prototyping, visualization, implementation and especially interaction with specialized hardware. Not all programming is a DefaultGeneralNullPointerExceptionFactory.

Matlab has an domain-intuitive design. OP shits on the fact that Mathworks mentions the extra brackets and numpy imports required to type when it in fact increases legibility of numerical code significantly (besides coming from a language which uses whitespace for indentation to increase its own legibility instead of brackets).

Yes, of course, one may question that it's proprietary and damn expensive, but to question whether it's users are programmers and claim superiority of python when only a fraction of its users work in the same domain, that's elitist, and hardly fitting the design goal of python and programming in general.

6

u/Alexanderdaawesome Aug 05 '19

Found the MATLAB employee ;)

In all seriousness, use what you want, but try to compare the two is silly on mathworks end. The legibiilty argument is so bad I had to do a double take. Legibility involves more than just a language selection (and is up to each individual), that should not be an argument when trying to decide a language.

Also since I halfway suspect you are a MATLAB employee, join the meme war yourself and get some free advertising. Do you even internet bro?

2

u/Gabe_Isko Aug 06 '19

Hey, I'm no mathworks employee, but he has a point - mathworks isnway better suited for certain engineering domains. Python definitely lacks a competent controls modeling package, and honestly I dont see anyone makingbine anytime soon. On the open source front as a whole, there is only really modelica, and it is no where near as nice as simulink. Matlab can also do some neat stuff with auto code generation for micro controllers. You could argue that cython can sort of accomplish that, but it isnt really what it is for.

However, I am a little bit skeptical at matlabs viability as a numerical computing engine outside of trivial model data. I would definitely not envy anyone having to use it for a real worn horse of an application that has to crunch through loads and loads of data. It's for that reason that I also wouldn't take it seriously as a machine learning platform either. I'm sure there are some great precanned models that mathworks has devised to implement ML for certain engineering problems (I believe their copy mentions a surface inspection and metrology ML application) but if you need to create your own model or do anything complex I am sure performance will become a problem.

3

u/tjl73 SymPy Aug 06 '19

As someone who wrote a huge portion of their Ph.D. in Matlab, it's the additional packages that really help flesh things out. While Numpy is pretty good, Scipy doesn't really have a lot of the toolset that you can get from Matlab. I only used a few packages, but they were pretty important.

I wanted to use Numpy, Scipy, and Sympy (full disclosure, I've been a mentor on some GSoC projects for them), but I ended up using Maple and Matlab because they had the capabilities I needed.

I fully admit that Matlab has some major issues in terms of programming features, its utility in other ways can outweigh those issues depending on your particular problem domain.

0

u/I_Feel_It_Too Aug 06 '19

As someone who wrote a huge portion of their Ph.D. in Matlab, it's the additional packages that really help flesh things out. While Numpy is pretty good, Scipy doesn't really have a lot of the toolset that you can get from Matlab. I only used a few packages, but they were pretty important.

Name one.

2

u/tjl73 SymPy Aug 06 '19

I mentioned this in another comment, but I didn’t find a package with the full set of features from the Control System Toolbox. I'd find parts of its features, but the features that related to finding transfer function parameters from experimental data, no. That’s just one example.

→ More replies (1)