r/Python • • Aug 05 '19

Python's response to MATLAB

Post image
4.3k Upvotes

372 comments sorted by

View all comments

Show parent comments

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.

2

u/TheBlackCat13 Aug 06 '19

It really depends on your particular domain. In some numeric and engineering areas MATLAB had a better set of packages, in others Python does. The problem is with the claim that MATLAB is better for engineering and numeric work in general, which is simply not true.

2

u/tjl73 SymPy Aug 06 '19

I fully admit it depends on your problem domain. I think for most traditional engineering domains (e.g., mechanical, chemical, electrical) Matlab is more comprehensive. Python tends to be better for more math oriented fields.

The point is that Matlab can't be replaced in all engineering fields just yet (as much as we'd like it to be).

1

u/okkshin Aug 06 '19

Indeed. But as a consequence, Matlab cannot be declared dead irrelevant just yet.

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.

1

u/I_Feel_It_Too Aug 06 '19 edited Aug 07 '19

Actually, I think you got me there.

Edit: Who downloads someone for admitting defeat? He really did get me there.

1

u/hughk Aug 06 '19

Where I worked at a bank, some people had Matlab, most did not. It was useful as a desktop application, primarily I think by the quants and the economists, but what with the licensing as such, it was easier to do most of the processing outside using Python or R. This saved the issue of ordering licenses which was never easy for more specialised packages. So daily, weekly, monthly processed tended to be migrated over time.

1

u/jammin-john Aug 27 '19

While I haven't done any extensive work into ML myself, I do happen to personally know someone who's written a general-purpose ML program. It's been used in a few scientific papers to help fine tune model parameters, but he also markets it to casinos to optimize their floor plans. Matlab must have some decent ML capacity in order to support all that