[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
MATLAB: Why?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /sci/ - Science & Math

Thread replies: 97
Thread images: 6
File: matlab_logo-1024x962[1].jpg (165 KB, 1024x962) Image search: [Google]
matlab_logo-1024x962[1].jpg
165 KB, 1024x962
Why the fuck do people still use this shitty language?
Why hasn't python been adopted?
Why is this a major part of every engineering curriculum instead of a simple language like python that actually makes sense and is more flexible?
Is Mathworks paying people to stay alive?
>num2mat
People are actually coding full projects in this bullshit. Can you really even call being proficient at MATLAB a skill?
>>
>>7978422
>python

Fuck no. White space sensitivity is autistic cancer
>>
>>7978437
Use semicolons and Whython?
Shit, I'd take Rust over MATLAB.
>>
>>7978459
Ruby is better friendo.
>>
>>7978422
>he only uses matlab to write stupid shit

the power of Matlab lies in the toolboxes and simplicity.
>>
>>7978461
Webdev is not /sci/, >>>/g/tfo
>>
>>7978422
Lua >>> python
>>
>>7978475
>everything is a float
KEK
>>
we had the option at my uni

I would recommend Python for these reasons
>can do everything MATLAB can (almost) just as easy
>it's free
>it can EASILY be extended to Java, C++, Fortran etc for numerical shit
>Python can also be used for other things, so by learning science programming with Python, you also learn programming and how general languages work
>>
>>7978422
Why the fuck do people still use this shitty language?
Matlab Toolboxes + Visualisation (GUI based).

Why hasn't python been adopted?
It has been adopted.

Why is this a major part of every engineering curriculum instead of a simple language like python that actually makes sense and is more flexible?
because Universities are business ;^)

Is Mathworks paying people to stay alive?
Yes + free licenses to institutions.
>>
You should check out the language Julia. It's aim is to knock down Matlab.
>>
>>7978437
I honestly don't understand why people get so buttblasted over this.
>>
>>7978491
>can do everything MATLAB can (almost) just as easy
Matlab has better vector programming
>it's free
torrents
>it can EASILY be extended to Java, C++, Fortran etc for numerical shit
What fucking retard would ever use java for anything /sci/ related? Also, matlab has mex for infacing with C++/C/Fortran since forever.
>Python can also be used for other things, so by learning science programming with Python, you also learn programming and how general languages work
Matlab can be used for general programming too.
>>
>>7978504
>Want to cut and paste code from another file or move code in the same
>Have to fuck around with whitefuckingfspace to get it to work

>Fuckers still use multiple space presses instead of a tab like it's the 70s
>>
>>7978513
That's it, really? Fuck you and all those like you.
>>
>not sensitive to whitespace
>better toolboxes
>better documentation
>better domain-specific third party package library
>better vector support
>better index slicing
>not literally designed for children
>>
maple is better than matlab, but python + sage is probably the right way to go.
>>
>>7978422
Does it really matter? As long as you get the science done.
>>
>>7978505
>Matlab has better vector programming
how so? vectorized programming with numpy is fast, and uses C++ (I think) for fast computing
it also has linalg modules for matrix and vector stiff
it's not AS GOOD as what matlab has, but there is not much matlab can do that python can't

>Matlab can be used for general programming too.
c'mon, how many serious programmers use the matlab language outside of science? it's made by engineers for engineers who wants to do science
>>
https://m.youtube.com/watch?v=uOzdG3lwcB4

Here is one of the guys from the standard implementation of the Pthon language and, even though I use Python myself at work, the amount of choices made makes dizzy. Of ciurse, if you're a numbercruncher and only do if-loops with numpy, making the code do MatLab kind stuff, then you might not care. But to me a language should be structurally simple or have clear semantics - maybe that just can't work if you have module abd classes and object and a whole bunch of notions of functions
>>
The only things that MATLAB does worse than Python is not allow multiple function defs per script file (as callable functions from the REPL, at least) and its OO implementation could be better.
>>
Is MATLAB ever used in private industry? I've used it heavily in my dsp courses
>>
>>7978582
It's used for scripting by people who like to be able to get on the phone with someone they pay if thigs don't work
>>
>>7978590
What does that even mean
>>
>>7978582
Yes.
>>
>>7978422
Money and contracts basically.

But our enigneering department has completely adopted Python as of two years ago, including teaching students Sympy instead of mathematica etc.

You too can fight the Jews OP, it's YOUR responsability to spread freetard propoganda and strongarm the faculty into adopting python.


Seriously though the other thing about python is that it at least teaches you something about real programming so you'll have an easier time learning C/C++ etc. MATLAB is kind of pointless and it doesn't even have the best proprietary implementaitons.
>>
>>7978505
>Matlab has better vector programming
It might be slightly faster than nimpy.array objects, but you can do so much more with numpy arrays, it's far more powerful in general.
>>
>>7978422
>Why the fuck do people still use this shitty language?
Because it's rarely profitable to re-code all of your Matlab software. Ever gone to your boss and asked him for a couple of hundred grand to re-implement some software tools just because there's another fancy programming language you'd rather use now?
>>
>>7978437
Why? Do you want to mash all your code onto one line or something you fucking faggot?
>>
>>7978513
You should never be cutting and pasting code between windows with a fucking clipboard, you obviously don't know jack shit about programming and your opinion is invalid.
>>
>>7978513
Maybe because you shouldn't be copying your CS101 homework from StackExchange like a bitch? You can use actual exporting methods when you're done being a faggot.
>>
>>7978513
Loser.
>>
>>7978613
It's easier to use in matlab
>>
>>7978504
>I honestly don't understand why people get so buttblasted over this.
It's a language designed for kiddies. The moment you start to use nested loops & conditions your code starts to look like a retarded mexican wave with different spacing everywhere. For simple shit it's okay i guess but why do that when there are {these things} to separate blocks of code in other languages?
>>
>>7978629
>has never coded anything with more than a few hundred lines
>>
>>7978645
>from pylab import *
there, nearly identical to matlab
>>
>>7978519
>>not sensitive to whitespace
Jesus...
>>better toolboxes
Debatable, orders less extensive and cutting edge if you include all scikits and most of them aren't as good as their python counterparts. MATLAB's control package can't be beaten though.
>>better documentation
Fuck no, absolutely not.
>>better domain-specific third party package library
*As long as you pay the jews for a license on every platform you own*
>>better vector support
Nigger what the fuck does that even mean?
>>better index slicing
FUCK. NO.
>>not literally designed for children
Python software controls more reactors in my company lab than MATLAB that's all I have to say with respect to that.
>>
>>7978646
>nested loops
Bitch please. If you use nested loops in Python, you're doing it wrong.

There's itertools.
>>
>>7978647
I'M the one who hasn't coded more than a few hundred lines?

>>7978646
You should always indent regardless of language retard. Too many nested loops that caused code to be shifted too far to the right? Stop being a retard and write helper methods.
>>
>>7978646
Nested looping is literally the defiinition of kiddie programming. It's only done by people who jack shit about oo and vectorising.
>>
>>7978437
for i in ["cheese", "pizza"]:\
print i;\
print "hello";

what whitespace? :^)
>>
>>7978592
There's official tech support for MATLAB, whereas if you're just using Python you have to hit the boards
>>
>>7978422
The only argument against MATLAB is it's proprietary. MATLAB is far more robust than Python when it comes to signal/image processing and control systems toolboxes.
>>
>>7979099
>MATLAB is far more robust than Python when it comes to signal/image processing and control systems toolboxes.

this.
>>
>>7978601
>Sympy instead of mathematica

I fully support the Python takeover of academia, but Sympy blows fat donkey cock. You can make Sympy completely shit itself trying to pass it integral transforms from an undergraduate signal processing class, and the support for piecewise functions is dodgy at best.
>>
Matlab is a matrix-oriented programming language so it can do automatic code parallelization, something almost every other other programming language lacks. Plus being matrix oriented means it's good for math. Real math.
>>
>>7979099
>>7979472
Python has Scipy and OpenCV though
>>
>>7978422

>3rd year comp sci major detected

this >>7979099
>>
>>7978536
>maple is better than matlab
They are not comparable.
>>
>>7978536
>comparing maple and matlab
I want first years OUT
>>
>>7980661

lol, right?
>>
>>7979855
>Matlab is a matrix-oriented programming language
>Matlab is a programming language
If you arent just using it as a scripting language and are making full fledged programs, you are using it wrong
>>
>>7979091
>Requiring tech support
senpai...
>>
>>7979099
>MATLAB is far more robust than Python when it comes to signal/image processing and control systems toolboxes.
Untill it stops working and then you can't fix it, unlike scipy.signal
>>
>>7978621
>You should never be cutting and pasting code between windows with a fucking clipboard
kek what would happen if you do?
>>
>>7979855
>Putting shit in an array is difficult guys I swear!
>>
>>7980841
Nothing, it's just likely that whatever you're copy-pasting is unusable garbage code considering you can't import and use it as is. You should never have clone code.
>>
>>7980832
Never said I did, I'm just clarifying what the other dude said
>>
>>7980837

go to bed
>>
File: Haskell.sh-600x600[1].png (54 KB, 600x600) Image search: [Google]
Haskell.sh-600x600[1].png
54 KB, 600x600
there's only one way to fix it
>>
>>7978653
>Nigger what the fuck does that even mean?
that it's easier to create, modify, and perform calculations on vectors and matrices. all the simple operators are overloaded so they work conveniently for matrix operations, in python you have to use function calls and it just turns into a mess.

caring about whitespace isn't just a meme. the entire point of a programming language is that you have explicit symbols for abstract operations, that you have information tied to discrete objects. implicit information in code like whitespaces carrying scope/block information throws that whole paradigm out the window and is just asking for bugs.

python's documentation is not better than matlab's except for absolutely trivial operations.

and lmfao you cannot seriously be trying to tell me that python does complex indexing better than MATLAB. base python is an absolute mess, and even if you're using numpy the syntax for constructing vectors to use as indices is never going to be as clean. you either need list comprehension or the r_[] function, neither is as simple as what you can do in matlab.

and if your company is using python to control complex equipment that says more about your company than about the languages desu
>>
>>7980842
Dear god you're retarded. I bet you've never worked with anything other than web development before.
>>
File: 1442819394186-ck.jpg (9 KB, 248x197) Image search: [Google]
1442819394186-ck.jpg
9 KB, 248x197
>>7978474
>he thinks ruby = ruby on rails
>>
>>7978469
>1200$ per toolbox
You want to use cuda?
1200$
You want to do signal processing?
1200$
You want to do anything other than multiply 2 matrices together?
1200$

Shit proprietary software.
>>
>>7978653
Was going to say this. As a control systems engineer, simulink and the control systems toolbox is unparalleled

For once you pure sci autists need to take a look at something from a different perspective...
>>
It's great for vectors and matrices, plus has a bunch of standard functions that are very useful. For my final semester physics project I had to do some work with arbitrary surfaces. When I needed the normal vectors to the surface at every point, I didn't have to write my own function or hunt down something someone else wrote and adapt it to my situation. I just used "surfnorm" and it did my work for me.
>>
>>7981498

>not having your account paid by industry or academia

haha
>>
https://media.giphy.com/media/1Z02vuppxP1Pa/giphy.gif
>>
File: 200_s.gif (2 MB, 350x194) Image search: [Google]
200_s.gif
2 MB, 350x194
>>
>>7978513
>Fuckers still use multiple space presses instead of a tab like it's the 70s

Literally every lecturer and trainer wil tell people attending software engineering or programming classes to never use tab.

The fact that you think the double-tap on the spacebar wasnt used since the 70s just shows that you are a basement-dwelling NEET who never actually worked in a group.

if you use tab instead of the spacebar and someone else has to use your code theyll rip you a new arsehole because they cant see shit once they ported/ copied it around.
>>
File: monad2.png (16 KB, 900x500) Image search: [Google]
monad2.png
16 KB, 900x500
>>7980832
>>7981277
I'm that other guy and used MatLab e.g. at Siemens. It's not just tech support, you e.g. also get seminar lectures

Speaking of which, I just come back from a day of MatLab and can contribute some autistic shits:
E.g. you got NaN to make arithmetic not crash if some matrix/cell/array entries don't evaluate or are bad input, but the way how checks like isNaN, or other quieries like if it's a number, work, this is unpredictable. NaN (literally "not a number") will be in some number space w.r.t. a quiery, and if you got a list of non-numbers then isNaN will return a list, which make naive function declarations like
f(x) := "isNaN(x) or isempty(x)"
(the latter returning a bool) throw and error.
But of course MatLabs if clause accept all of the three

false
0
[]

as false, you can write

if isNaN(x)
g(x)
end
if isempty(x)
g(x)
end

but you can't do

if (isNaN or isempty(x))
g(x)
end
>>
>>7983315
Why did you destroy him like that?
>feels
>>
>>7983315
>ripping someone a new asshole
>when they can just s/\t/ / to fix it
>>
>>7978646
If you were proficient with Python you would realize that you don't need to use nested loops.
>>
>>7981358
please tell wallstreet that
>>
File: rage pepe.jpg (142 KB, 900x900) Image search: [Google]
rage pepe.jpg
142 KB, 900x900
>>7983684
anon makes a point
Outside of academic/corporate cronyism
Why don't we see matlab on wallstreet?
Python certainly exist there.
Why is it that only engineers use it? Because its easier? Its a scripting language, performance really isn't key.
Ah, that's right - they were expected to learn it in school! Classes are named after it! They have engineering toolkits to keep you drawn in!

Thats why pure maths will use shit like lisp or fortran before matlab.
Thats why financial markets and stats people would rather use R or python which is encroaching on its niche.

>people defend this tragic amalgamation of code.
You've been brainwashed; you don't even know you are eating the feces Mathworks hands you on a platter.
>>7978519
>better index slicing
My sides, good one anon. Matlab is even too retarded to have the same indexing operator for its classes

>>7978505
>Matlab can be used for general programming too

>named operators 2 hard 4 me, matlab is simpler :^)
>whitespaces are evil my matlab code with control statements is nested without those!
>>7978646
>start to use nested loops & conditions your code
confirmed for never taking an introductory CS course
>making monolithic code
>>
>>7978422
> No proper IDE
> Defining functions makes your code significantly slower
> Have to use Python in docker containers to stop it from breaking whenever you install new modules
> Whitespace making editing code far more difficult than it needs to be
> Difficult to compile Python into binary executables
> Huge split in code developed for Python 2 and Python 3

Don't get me wrong, I really like working in Python, but it has its problems, and I can also understand the appeal of MATLAB. My code development time in MATLAB is faster than in any other language. Also them toolboxes, bruh.
>>
>>7983512
See the issue is that engineering all breaks down to economics. Engineers are expensive. Why? I don't know, the work we do is really easy. We just connect dots that other people draw.

Python can do just as much as Matlab and probably more, but it takes much more time and practice to be experienced with it. Matlab has two requirements to becoming proficient:
>have you ever programmed before?
>have you ever used a graphing calculator before?
Compared to the cost of paying someone to control machinery with python, Matlab licensing fees are nothing.
>>
Alright /sci/ today I'm going to teach you how to program with python

>import urstuff

come back when you learn a real language
>>
>>7981358
>caring about whitespace isn't just a meme. the entire point of a programming language is that you have explicit symbols for abstract operations, that you have information tied to discrete objects. implicit information in code like whitespaces carrying scope/block information throws that whole paradigm out the window and is just asking for bugs.
This
>>
>>7984588
>No proper IDE
PyCharm
>Defining functions makes your code significantly slower
Matlab suffers from this but i don't know what extent
> Have to use Python in docker containers to stop it from breaking whenever you install new modules
u wot
try installing with PyCharm then
>Whitespace making editing code far more difficult than it needs to be
not really, but I see this is a common gripe and understand the annoyance
> Difficult to compile Python into binary executables
Depends, but agreed
> Huge split in code developed for Python 2 and Python 3
Yeah, but
>using Python 3
>>
>>7978422

MATLAB is actually really useful once you're skilled in it. Are there better programs? Eh, it depends. In my experience, MATLAB is used as a giant calculator, and it's good as that.
>>
>>7978491
Python has fixed income tool boxes and that can use a Bloomberg Console feed for real time trading with real money?
>>
>>7978536
That you would write that shows how stupid you are. They are different tools for different jobs.
>>
>>7978422
it's literally like the babby language, you basically just type what you want to happen and it handles everything

which, your not gonna use it for a serious project or anything with nontrivial computation time but if all you are doing is crunching some quick numbers for homework or something its just the most convenient

and, well. the mat stands for matrix not math, its just more convenient than python when youre working with matrices, sure numpy but its not the same as the whole GUI and everything automatic
>>
>>7985416

>PyCharm
Not free, unfortunately. Sure, MATLAB isn't free either (inb4 Octave), but I don't like paying for a reasonable IDE when everything else in Python is free and open source.
Sure, there's also Spyder/Anaconda, but it gets really buggy with more modules.
> Matlab suffers from this but i don't know what extent
True, but MATLAB never tries to be a real programming language; it's good at what it does, and stays within its remit.
>Yeah, but
>>using Python 3
It's a bit of a stumbling block to the lay man, or the average engineer, you have to admit. MATLAB can be used by any idiot.
>>
>>7985469
Python is the babby language mate
>>
>>7978582

I work at Raytheon and it's used extensively.
>>
>>7985439
>MATLAB is used as a giant calculator, and it's good as that.

this
>>
Don't risk analysts at financial firms use MATLAB?

MATLAB has nice plots and figures 'n shiet.
>>
>>7985643
>Don't risk analysts at financial firms use MATLAB?

I worked for a year with a data analysis firm, one of the things we did was risk analysis, I never used MATLAB, we either used Excel (I shit you not), some third party software (the of which escapes me right now) or a language of your choosing (which was normally a scripting language, most used Python the rest used Java).
>>
>>7985670
Did you make a lot of money?
>>
>>7985765
Not really, I was still in "probation phase" or whatever so I earned pittance. And then I got an offer for my masters + a scholarship so I quit, it was kind of boring desu, that might have to just been the company I worked for though, it was quite small.
>>
>>7985772
Do you make a lot of money now? What are you studying?
>>
>>7980837
>scipy.signal
lol m8, if MATLAB is so shit why is this literally a copy of some of its functions?
http://docs.scipy.org/doc/scipy/reference/signal.html
>>
>>7985827
>Do you make a lot of money now?
Nope, because I'm unemployed and doing my M.Sc.

>What are you studying?
Theoretical physics.
>>
>>7985860
Are you going to make a lot of money?
Thread replies: 97
Thread images: 6

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.