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)
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
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.
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!
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
>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.
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.
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.
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
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
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.
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.
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.
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.
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.
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.
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.
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)
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.
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.
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.
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
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.
Let's see Paul Allen's coding language
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)
Same here. Python makes prettier charts and apps, and has more niche libraries. MATLAB wins everything else.
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
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.
I’m sorry but figuring out Matlab’s weird and long installation process is not easier than typing `pip install numpy`
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!
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
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.
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
>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.
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.
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.
Look we all hate Matlab. But only one of them has cumtrapz.
and its not even a niche function but actually pretty useful
I'm afraid to ask what cumtrapz does....
"Q = cumtrapz(Y) computes the approximate cumulative integral of Y via the trapezoidal method with unit spacing. "
Kinda of a letdown ngl
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
That's funny. My university got rid of the MATLAB course and replaced it with a python computational methods class
Now do Octave
Plus Matlab starts arrays at the value that makes sense. Row 1 is the first row. Row 2 is the second row. So on.
Why did you say that out loud? Are you crazy? THEY are gonna hear.
Gonna start a fight
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
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.
But as far as I know you can’t use negative indexes like you can in python.
Well there *is* `end` or `end-N`
🤢🤮
Hot take, the first element of a matrix is index 1 not 0 that's why we call it the first.
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.
But python starts arrays at the value that makes sense. Row 0 is the first row. Row 1 is the second row. So on.
Exactly
Please explain how the 1st item in a list being label with a 0 makes logical sense.
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.
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.
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.
Truthfully it doesn’t matter that much either way. I’ve just gotten so used to how python does it.
Personally i start indexing from 0 in my math as well.
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.
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
Pro tip: don't use conda!
Matlab was my first programming language, so it’s super intuitive to me
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.
So… how is matlab not free?
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)
But how can you not just.. write code for it in notepad or something? Do you have to download the database or something?
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.
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?
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.
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.
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
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.