[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 1.94 MB, 640x640, 1599011426877.webm [View same] [iqdb] [saucenao] [google]
12117143 No.12117143 [Reply] [Original]

MATLAB/Octave vs Mathematica vs R vs Python vs Haskell etc.
Does anyone use any of these for anything?
Is there any reason to learn proprietary scripting languages or it is better stick with Python/Haskell? For example you need to solve a quadratic or cubic equation. Does any of these math packages do it out of the box or would you need to write a script? Or it is easier to use online calculators? Which of these packages is best for visualizing linear algebra/matrix transformations etc? Is there something built in or you'd still need to write a bunch of scripts?

>> No.12117527

Matlab's algorithms are more efficient than Python's in certain instances. I've seen this first hand during one of my projects. I haven't worked with the others.

>> No.12117549

>>12117143
Octave is not propriety. Python can be cumbersome to deal with compared to octave or matlab to do the same thing . I use matlab/octave mostly for visualizing data and to do quick math and it’s definitely less cumbersome then python. Probably the same with Haskell although I’m not familiar with it. To graph 2 matrixes of data it’s literally plot(x,y) and a graph pops up no imports or anything. While python of course is of course superior in many different ways it doesn’t beat the ease of use with matlab/octave. It can do all the symbolic shit too easier. It’s also useful if you ever end up doing control systems to know your way around matlab since it’s integrated into simulink.
Basically you can do everything in python with all those libraries you can do with matlab/octave but easier. One of the most notable things is better error messages.

>> No.12117555

>>12117549
I mean matlab and octave are easier

>> No.12118665

>>12117555
Yeah, thats been my first impression. Python is more powerful but it is almost as if you tried to build your own "matlab".

>> No.12118715

Another thing I just realized I don't really need a fully fledged CAS. All I probably need is basically a fancy graphing calculator. That reduces the list down to matlab vs octave I guess. But if anyone cares about a CAS, there is also Sage which is python based.
That said, there are plenty of online options for numeric stuff, so I am not even sure I need to install anything on my computer lol.

>> No.12118746

>>12117143
Just use Coq, it's cumbersome but at least you are sure that your program is correct.

>> No.12118759

>>12117143

>MATLAB
is proprietary garbage that you should only use if someone is paying your license and want you to specifically write MATLAB programs.
>Octave
is a meme.
>Python
is the most flexible out of those, and will get you the farthest if you're not wanting to learn more than a single language.
>R
is really good at statistical analysis, but not at anything else.
>Haskell
If this was useful to you, you wouldn't be asking for advice on what language to use.

Just go with python. Then learn a compiled language like C/C++ or FORTRAN down the line if you need SPEED.

An alternate recommendation would be Julia, which is an excellent language. However, it is still in its infancy, and is still somewhat of a hipster language. (but will likely become mainstream in a few years given its backing.)

>> No.12118763

>>12117143
python >> haskell > matlab = mathematica >> r

>> No.12118837

>>12118759

>R for statistics
Looks like it has a bunch of other stuff and technically should be able to do everything that matlab/octave can do, but I am not sure

>> No.12118841

What about Maple or Magnum?

>> No.12118845

>>12118759
also
>learn a compiled language like C/C++ or FORTRAN down the line if you need SPEED.
To use with what package? Do you mean use a standard C/C++ compiler plus 3rd party libraries or the other way around, some math package that allows you to write extensions/libraries in c/c++?

>> No.12118877

>>12118837
Yeah sure, but its not particularly useful for general purpose stuff (neither is MATLAB/Octave). If you're autistic enough, you can do your computations in LaTeX or powerpoint as well (both are Turing Complete), its just not a very good idea.
But seriously, out of those languages Python will offer you the most value for your time on account of its widespread use and flexibility. Autists will convince you its terrible (and they'd be right, for technical reasons), but its still the best all around language today. Numpy, scipy and matplotlib covers most of your numerical needs.

>>12118845
sometimes, the problem you're trying to solve can't be "vectorized" and solved using numpy (which is a wrapper for fast C code). So, you're left having to write your own loops in python (same applies to matlab, R and octave).
At this point, it MAY be a good idea for you to speed up these performance critical parts of your program by writing your loops in a fast language. But this will only be an issue if you're interested playing with larger/complex problems. So basically, don't worry about this for now. You can still use python for these things, it'll just take longer to get your results.

>> No.12118881

>>12118845
With Python you dumbass. You write the packages for it in C or use ones that already exist.

>> No.12118885

>>12118877
>for general purpose stuff
like what?

>> No.12118909

>>12118885
Like literally anything you'd want to program. Python has a fucktonne of packages and you can do basically whatever the fuck you want in it in addition to solving maths problems.
It's basically the swiss army knife of programming languages.

>> No.12118990

>>12118837
>>12118759
R is awesome if you are working with linear algebra. If not, there are options to write compiled C++ functions which could be called right from R

>> No.12119063

>>12118990
Matrix/vector syntax seems to be more cumbersome in R compared to matlab/octave.
You have to use c('...') or something like that, and then some extra parameters when defining a matrix. And operators look like %o%. matlab seems more intuitive, it is just [...;...] and a more natural operator syntax.

>> No.12119087
File: 327 KB, 859x960, KoAvFZk.png [View same] [iqdb] [saucenao] [google]
12119087

>>12117143
>Yes, I use MATLAB, why do you ask?
>What do you mean by "proprietary garbage"? Sorry I don't understand poor speak