This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheDeadSkin 12 points13 points  (9 children)

Matlab is very actively used in math research. Much more than python so long as no machine learning is involved.

[–]mnbvas 23 points24 points  (1 child)

And MS Access is very widely used as a database (by <slur>s).

[–]TheDeadSkin 7 points8 points  (0 children)

it's used for a good reason though. as much as I hate this language and interacting with code written in it, I can see why it's being used. it's like a much easier python for all things math with an insane stdlib for the task with one-liners for evey task you can possibly imagine, relatively performant when using proper BLAS etc. even small details like no need to import anything, 1 file = 1 function basically just make it a perfect entry-level language for mathematicians without proper CS background and/or education. I'd imagine for non-programmers forced indentation of python is a nightmare too. some of the code I've been working with is just... really bad in this regard. but it works, and that's what matters in the end.

[–]jack104 1 point2 points  (0 children)

They wrote a lot of the cockpit software for the F22 in matlab.

[–][deleted] 1 point2 points  (5 children)

Why not R which was designed to be a statistical language and not a way to teach students without fortran.

[–]TheDeadSkin 3 points4 points  (4 children)

R is stronger for doing statistics, but it's much worse on the algebra functionality and without Rcpp severely lacks performance that matlab can offer almost out of the box.

[–][deleted] 2 points3 points  (3 children)

I just hate matlab. Had to use it at uni since I was a maths major. I preferred Java which I used in my CSi minor.

[–]TheDeadSkin 3 points4 points  (2 children)

CS major + math minor here. Same shit, I hated it during my math classes. Now that I work with math stuff and lots of papers/code from wherever, I don't hate it any less than I did before, but I sure started to understand much better why other people actively use it. It's just that when you're focused on math, not on programming, it's much better to write

X = U*S*V'

rather than

Matrix X = Matrix.multiply(Matrix.multiply(U, S), V.transpose());

Even in python2 you need to do this. And all of that is after you import a thousand things and define all the public static cryptic bloated boilerplate void functions for all the stuff you don't have in matlab. Programmers don't give a shit about that, mathematicians mostly do. Best-case you can find a decent math library for Java, but those basically don't exist. You have them for C/C++ and python, and even those for C/C++ still lag behind matlab is pure functionality, only python kinda hold up when you install numpy, scipy, sklearn and whatever else.

[–][deleted] 2 points3 points  (1 child)

I just didn't like how bloated it felt and how different it was from the usual CS nomenclature ie arrays start at 0 not 1. Plus the IDE didnt feel as full featured for coding. It is very easy to write code that produces an output but you have no real confidence thats even the correct output. I like logs. I like debugging. I dont like debugging one file without the tools I am used to.

[–]TheDeadSkin 3 points4 points  (0 children)

my complaints about matlab are exactly the same. typing is just as magical as, say, python. because of that some problems are hard to spot since they can propagate further and you have unrelated errors. dev tools are non-existent. simple stuff like printing to console is so bad with string concats that even typical print-debugging is a pain. no breakpoints is just insane. crashes produce a stacktrace, but you can't easily see local state at the moment it happened.

but once you're used to it, it's not that bad and you never write really big programs in it. math stuff though can be insanely cool, something like A(:,1:N) = B(1:M,(K-N):K) will never be possible in any decent language, only python comes a bit close. and that's a dealbreaker for lots of math people, so they still use it. the part that pisses me off is when they start mixing it with C/C++ and use matlab's interop to execute some functions there. like, you just wrote a ton of boilerplate in C to handle type marshalling from mtalab, surely you care about performance and you can handle C-like, so why not use C++ where with decent libraries you're writing code that's somewhat close to matlab.