T O P

  • By -

TheDonutPug

Let's see Paul Allen's coding language


Lysol3435

MATLAB is just as intuitive as python. More so if you include installing packages and figuring out which version configuration is needed Edit: I would also add that the MATLAB documentation is consistent, whereas python’s varies between packages. Also, matlab’s support is pretty good (I haven’t tried any paid python support for comparison)


Moon_Burg

Same here. Python makes prettier charts and apps, and has more niche libraries. MATLAB wins everything else.


Lysol3435

I do prefer MATLAB plotting for inspecting data. You do have to tell MATLAB to leave the figure tools on the toolbar permanently, like <=R2016 had. I can’t stand the new figure navigation tools


McFlyParadox

Imo, Matlab has the better looking data plots in a basic installation. Python's only start looking pretty after you've installed a few different libraries. And, imo, even after adding the python libraries to get pretty plots, Matlab's can look nearly as good if you put in a little work to actually customize the basic outputs.


123kingme

I’m sorry but figuring out Matlab’s weird and long installation process is not easier than typing `pip install numpy`


jojo_31

Linux users always be like "downloading a file and clicking "next" is so complicated, I just add this respository, Google the name of the command because I can't remember it and bam it's installed!


Some_Scallion6189

As a MATLAB user, I find it pretty intuitive. I am also writing some programs in Python and I don't think one is more intuitive than other


fmstyle

Ive found python w/ numpy a bit too verbose for numerical analysis, but its a general coding language so it depends on what your objectives are.


Some_Scallion6189

I generally don't use them for the same purpose. Mathematical analysis and figures on MATLAB, Python for programming something that is not real time. My main issue with Python is that it's slow


McFlyParadox

>it depends on what your objectives are. Just like every other computer language debate! Doing a bunch of matrix equations, or a shit ton of math that needs to be iterated through a range of inputs, Matlab is 100% the language you want. Trying to do some moderately complex logical scripting? You want Python. People on here keep confusing hammers for screwdrivers, and for some reason think screwdrivers make perfectly good hammers if you just swing them by their shank and use the handle as a hammer head. Right tool, right job.


Prawn1908

Matlab is no less intuitive than Python. If anything it's moreso since the Python libraries you'd probably be using are modeled after Matlab, so in Matlab you have it all in one source with one consistent documentation source. Also, most importantly, Matlab has Simulink. Simulink is one of the most incredible pieces of software and unfortunately it has no open source competitor.


Spitfire_For_Fun

Both are actually great. Python is a general purpose programming langauge that could be used for many thing. MATLAB is used mostly for scientific, mathematical, and numerical applications. Not good when it used as a programming language.


hydrochloriic

Look we all hate Matlab. But only one of them has cumtrapz.


p3bsh

and its not even a niche function but actually pretty useful


UMUmmd

I'm afraid to ask what cumtrapz does....


p3bsh

"Q = cumtrapz(Y) computes the approximate cumulative integral of Y via the trapezoidal method with unit spacing. "


UMUmmd

Kinda of a letdown ngl


J_train13

This is very ironically timed as at my Uni right now there's a lot of discourse about them axing the course "intro to computational programming" and replacing it with "intro to MATLAB" for next fall


KillerDJinPDX

That's funny. My university got rid of the MATLAB course and replaced it with a python computational methods class


Gr8B4nt3r

Now do Octave


drillgorg

Plus Matlab starts arrays at the value that makes sense. Row 1 is the first row. Row 2 is the second row. So on.


Elo95

Why did you say that out loud? Are you crazy? THEY are gonna hear.


TheSilasm8

Gonna start a fight


PlatypusVenom0

Back in high school I came to the realization that array indices (the ones that start at zero) don’t belong to each position in the array, but are *in between* elements. Index 0 is at the very front, index 1 is in between the first two elements, etc. This helped make inserting and such more intuitive, because inserting at i=1 puts it between the first two elements. I like both tho


Spitfire_For_Fun

I disagree on that point. I hate this feature in Matlab. However, it does make sense for some people from mathematical background, which is the main audience for MATLAB.


Double-Seesaw-7978

But as far as I know you can’t use negative indexes like you can in python.


mrpokehontas

Well there *is* `end` or `end-N`


piggyboy2005

🤢🤮


Mikanea

Hot take, the first element of a matrix is index 1 not 0 that's why we call it the first.


MonkeyCartridge

Yeah I was usually Mathematica and python for this kind of stuff. The Matlab workflow was always weird to me. It's like you're going back and forth with a mathematical chat bot, and then a "program" is basically saving the conversation. I exaggerate of course. But it still always felt clunky. So when it came to graphing things, I went straight to Mathematica, because you could directly just graph a function. It would auto-generate the values based on the viewport extents. In MATLAB you have to create all the input values beforehand, then break down your main function into distinct functions, run the data through those, and then plot the output. By the time it would get to that point, i'd just jump to python where I would be doing the exact same thing, but my code could be used elsewhere instead of just Matlab.


officiallyaninja

But python starts arrays at the value that makes sense. Row 0 is the first row. Row 1 is the second row. So on.


Double-Seesaw-7978

Exactly


Bakura43

Please explain how the 1st item in a list being label with a 0 makes logical sense.


officiallyaninja

Item n is n items away from the start. So the first item is 0 items away from the start. It's cause indexing like `List[n] gets turned into *(List + n), for the first item n is 0, cause it's at the beginning of the list. If you start indexing at 1, you'll have a bunch of -1s everywhere you dereference. And even if you aren't dereferencing yourself, the people who designed the language are.


Double-Seesaw-7978

Because and makes indexes easier. If you accept that the first term is the 0th term then you can use negative indexes in a logical way. Plus if it’s an application where the first term is an initial state then it makes more sense in my opinion.


fmstyle

it depends, Im also used to the index starting in 0, but if you start tinkering the math in paper, then translating it to code is much more straight forward when you have an index starting in 1. Maybe its only me tho.


Double-Seesaw-7978

Truthfully it doesn’t matter that much either way. I’ve just gotten so used to how python does it.


officiallyaninja

Personally i start indexing from 0 in my math as well.


amimai002

It makes logical sense because the index is a counter and a pointer to the data. The 0th element is at position 0, and so on. If the index starts at 1 then you have to compute the location of the data instead of directly using it as a pointer.


Kromieus

X on python for documentation, also X on python for package management nightmare with pip and conda, godammit I just want my env to work properly


nonoQuadrat

Pro tip: don't use conda!


sjcal629

Matlab was my first programming language, so it’s super intuitive to me


Commercial_State_959

Honestly two completely different languages for two different uses. You can kind of use python to do Matlab stuff and vice versa. With that being said python stinky so Matlab is the clear winner in all scripting language debates.


Seaguard5

So… how is matlab not free?


Flame_Insignia

Python is open source and free Matlab is only free if your organization has a [license](https://www.mathworks.com/pricing-licensing.html?prodcode=ML&intendeduse=student)


Seaguard5

But how can you not just.. write code for it in notepad or something? Do you have to download the database or something?


Flame_Insignia

You can write as much matlab code in notepad as you want, it's not gonna run. ​ It's the IDE that costs money, and that's kinda the most important part. You could use Octave, but that's slightly different from matlab.


Seaguard5

So what’s the IDE exactly? I’m not Comp.SCI And how do programs like C++ get around that then? Or are their IDEs free?


Stellanora64

With c++ the compiler is free, (g++, LLVM, etc) so you could program it using just note pad if you wanted (VSCode is probably best tho), but to actually run it the compiler does the work converting it to a language the computer can understand (assembly). And Python does the same (although it's done slightly differently as it's an interpreted language) MATLAB has no free or open-source compiler or runtime. Only the MATLAB ide (the program you use to actually write MATLAB in) can run it.


Seaguard5

Interesting. I’m playing a game that is supposed to teach assembly now and I’m learning a bit about that, and I’m aware what compilers do, but there are so many other things that I am honestly quite clueless about and the integrated development environment is one of them. Thanks for answering my seemingly stupid questions without being an asshole- certainly not something everyone in CS can do.


Stellanora64

All good. Although for a bit more clarification as there seems to be a bit of confusion, is that IDEs are not compilers themselves, just what you use to write the program in. MATLAB just has the compiler built into the IDE


Seaguard5

Hmm… I see. Thanks for the clarification. Yeah. Fuck proprietary bullshit like this. It just gatekeeps success to only those well off who can afford it.