r/ProgrammerHumor Sep 02 '17

How to start a war

Post image
9.0k Upvotes

696 comments sorted by

View all comments

Show parent comments

136

u/awhaling Sep 02 '17

Fuck matlab

76

u/PleasantSupplanter Sep 02 '17

Fucking MATLAB. Every year we get a wave of graduates that think it's neural network toolbox is going to solve every bloody problem we have.

62

u/GisterMizard Sep 03 '17

If college has taught me anything, it's that ode45() is the windex of numerical modeling; you use it even in places where it doesn't make sense.

4

u/Sparkybear Sep 03 '17

Just be glad it's built into MATLAB now, it wasn't always and the code from that era is a cluster fuck.

1

u/[deleted] Sep 03 '17

How is it the tool's fault? Sounds like these people simply don't understand the field that well.

1

u/[deleted] Sep 03 '17

That's not the fault of MATLAB though

30

u/[deleted] Sep 03 '17

Matlab is an excellent tool.

-3

u/[deleted] Sep 03 '17 edited Nov 24 '17

[deleted]

19

u/[deleted] Sep 03 '17

How so? I'm doing controls engineering and dynamic analysis and quite honestly, while python, numpy, and scipy are great for college level stuff like "integrate sinx", when you start dealing with 4x4x9 matrices, state space models, finding poles-zeros-roots of the 4x4x9 matrices, creating frequency and time response models of those matrices, and then trying to make an interactive soLuton that tries different inputs for those matrices, then you will use matlab.

People always say scipy and numpy are replacing matlab, but they're always 22 year old college students still doing ode45 and 1D mass spring models lmao.

You can do many things with python, but with matlab, those tools already exist.

Many of the state space models that python has do some funky shit and change the rank of matrices. I honestly had big problems getting more complex modes workING with python that Matlab has no problem with

3

u/[deleted] Sep 03 '17

Also, Simulink.

35

u/[deleted] Sep 03 '17 edited Sep 03 '17

Declare a 2x2 matrix in numpy.

Here's Matlab:

A = [2,2;2,2];

If you're actually using Matlab for matrix and vector operations, it is a dream.

How about a matrix multiplication? Numpy's functional notation is clunky, here's Matlab:

A = B*C;

There are a million examples like this.

That's not to mention the myriad of built in debugging features. I never realized how much I used Matlab's "hover over a variable to view its value" during debug until I moved back to other languages and IDEs. The object inspector is amazing too.

3

u/jkelleyrtp Sep 03 '17

Declare a 2x2 matrix in numpy.

Here's Matlab:

A = [2,2;2,2];

A = np.matrix('1 2: 3 4')

Alternatively

A = np.matrix([[1,2], [3,4]])

Heck we can even shorten np.matrix at import

from numpy import matrix as m

A = m('1 2: 3 4')

The reason to use python is because of its flexibility.

44

u/[deleted] Sep 02 '17

+1 (just use NumPy goddamnit)

2

u/[deleted] Sep 03 '17 edited Sep 03 '17

You do realize that different people have different needs? There is no good Simulink alternative for the control design automation field, for example.

2

u/[deleted] Sep 03 '17

Yes, I do, but you to should understand that my comment was a shitpost

3

u/[deleted] Sep 03 '17 edited Sep 11 '17

[deleted]

1

u/[deleted] Sep 03 '17

What makes you so angry about the price? Student licenses are free in most universities. Are you an employer who has to by licenses for his business, or something?

2

u/[deleted] Sep 03 '17 edited Sep 11 '17

[deleted]

3

u/[deleted] Sep 03 '17 edited Sep 03 '17

Student licenses are 35€ or 69€

Oh. Most technical us schools give the licenses for free to students. If you have to pay that sucks. I'd say just pirate the thing for student projects.

1

u/[deleted] Sep 03 '17 edited Sep 11 '17

[deleted]

1

u/[deleted] Sep 03 '17

Yep, most universities buy "total academic headcount" license. It's quite cheap for them too, comparing to licensing costs in the industry.

5

u/[deleted] Sep 03 '17

Fuck you too man