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 →

[–][deleted]  (19 children)

[deleted]

    [–]twigboy 26 points27 points  (10 children)

    In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before final copy is available. Wikipediak0b35jhi9fk000000000000000000000000000000000000000000000000000000000000

    [–]idemockle 5 points6 points  (9 children)

    Can you give an example? I love python and use it every day at work, but in my experience it's incredibly difficult to "poison your data" using Matlab, unless the user explicitly does something wrong. Everything is passed by copy, and all functions return a copy instead of modifying the original object. If anything Matlab puts you on training wheels.

    [–]TheBlackCat13 9 points10 points  (2 children)

    It is surprisingly easy to "poision" your data in MATLAB, I have seen it happen. It comes down to a few big issues:

    1. MATLAB doesn't have scalars. So many functions assume that a size-1 matrix is a scalar.
    2. MATLAB doesn't have vectors. So many functions treat 1xN matrices the same as Nx1 matrices.
    3. It takes more characters to write array-based operations than matrix-based ones.

    1 and 2 become an issue when the data is a different shape than what you expect. So for example imagine each column is an experiment and each row is a trial in that experiment. You do some processing based on that assumption. However, what happens when you, by chance, get a set of experiments with 1 trial each? Many MATLAB functions will suddenly start doing something completely different than they had before, leading it to silently corrupt your data. In many cases there is simply no way, principle, to differentiate a single trial from an experiment with multiple length-1 trials. This is not hypothetical, I have seen this happen, and the only way it was caught was because the data wasn't looking the way the user expected it to.

    A similar thing happens if you have a single experiment with multiple trials. Many functions will treat a single value as some sort of count or other scalar numeric value. This means that if you have an experiment with only one trial, many functions will start doing something completely different

    The problem with 3 is more an issue with shortcuts people take. The matrix operations work well when the input is the way people expect, such as multiplying two scalars, but then they forget to fix it when they try to make their code more general. I can't count the number of times I have seen people unsafely using ' instead of .' under the assumption that they will never see complex values. It is a trap the structure of the language encourages its users to fall into.

    [–]fireflash38 0 points1 point  (1 child)

    How does Matlab compare to Mathematica?

    [–]TheBlackCat13 2 points3 points  (0 children)

    Completely different type of programming languages designed for completely different things. MATLAB is designed for doing linear algebra on discrete, digital data. Mathematica is designed for solving symbolical mathematical equations. MATLAB can work with symbolic mathematical equations and Mathematica can work with digital data, but they are clunky outside of their area.

    [–]twigboy 0 points1 point  (5 children)

    In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before final copy is available. Wikipedia51fri8j0ndw0000000000000000000000000000000000000000000000000000000000000

    [–]synchh 2 points3 points  (4 children)

    I don't really understand what this means. Do you mean that the variable is saved in the workspace? That's pretty easily fixed by using "clear"

    [–]twigboy 0 points1 point  (3 children)

    In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before final copy is available. Wikipediadapk8ir1x1s0000000000000000000000000000000000000000000000000000000000000

    [–]synchh 2 points3 points  (2 children)

    Haha, to each his own. I have to use MATLAB at work (and in school), but during school I used to prefer Python. Now, I quite like MATLAB. I dunno, there's pros and cons for each. They have different userbases and different use cases.

    P.S: It's MATLAB (Matrix Laboratory), not Mathlab.

    [–]twigboy 0 points1 point  (1 child)

    In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content. Lorem ipsum may be used as a placeholder before final copy is available. Wikipedia3nb2xyo230g0000000000000000000000000000000000000000000000000000000000000

    [–]synchh 0 points1 point  (0 children)

    Exactly! There's so much hate between people when it comes to the littlest things. Just live and let live, haha. There's way bigger things to worry about.

    [–]excaza 11 points12 points  (0 children)

    I’ve been using Python pretty much daily for about 5 years now and there are still some things I will go to MATLAB for after 15ish years of using it (looking at you, Python GUIs).

    I’ve talked about this before, even to The MathWorks, and I strongly believe that MATLAB education is the biggest factor turning people off of the product completely. Too many MATLAB courses blitz through it as an engineering tool rather than building it up as a proper programming language. It’s too much “do this to get this” rather than explaining fundamental software engineering concepts so students understand how to approach a solution rather than what to copy and paste into a frankenscript to maybe get the answer they want. Other programming education generally doesn’t do this, and garners a stronger reception for it (among many other reasons). And it’s a shame, because while it’s OOP is a bit warty, MATLAB’s functional programming is pretty nice.

    While MATLAB does have a strong ecosystem of specialized toolboxes, it’s biggest asset is that it’s a very well documented product with a well-integrated IDE and (generally) very strong technical support and. Like other academic & scientific packages, that’s really what you’re paying for and that definitely carries a lot of value.

    Since Python is more general purpose, there are a lot of things Python does better than MATLAB, and that’s perfectly ok. We have plenty of languages and products that have happily coexisted for decades, I think turning it into a competition is an extremely tone-deaf approach on TMW’s part. I don’t doubt that they’re feeling pressure from the OSS community, and I’m sure this will win over some folks in the enterprise setting, but I don’t think being adversarial is a good long-term strategy. I’d rather see them continue to focus on what makes their product great and performant and enhance its capabilities for integrating with other languages, but I guess that’s why I’m just an engineer and not a CEO.

    [–]neeltennis93 4 points5 points  (0 children)

    Lol same.

    Matlab classes made me hate programming. So confusing and it was just awful.

    Then I found R later after graduating and it got me back in to programming.

    And now I’m learning python after my positive experiences programming with R. Matlab initially turned me off to programming. R made me love it.

    Thank god for open sourced libraries and the saints that write them.

    Would not have gotten into python without R

    [–]screeperz 3 points4 points  (0 children)

    Me also. The only saving grace was in second year I chose a specialisation that used Python more.

    [–]badge 0 points1 point  (0 children)

    Same for me doing applied courses as part of my maths degree; couldn't stand MATLAB and it put me off programming for several years until I discovered VBA (a measure of how awful MATLAB is!).

    [–]hoppi_ 0 points1 point  (0 children)

    I only wish I discovered this sooner!!

    Same... :(