4
spector
5y

MATLAB literally has matrix in the name but the fucking array start at 1 thing fucks up every single time I try to use a matrix or array. How do you do the one thing you designed your program to do so fucking poorly. Whoever decided they were going to make arrays start a 1 for a matrix manipulation program should be hung and quartered.

Comments
  • 1
    I always thought the “MAT” was for math.
  • 2
    To be fair, that's one of the few things that I can give them a pass for.
    The main purpose of matlab is to work with math stuff, and mathematical notation starts indices from 1. It's annoying from a "traditional" programmer's point of view, but that's not what they were going for.

    Still, fuck matlab
  • 1
    The only reason programs start arrays from 1 is because in many languages, especially high performance, array index is just a memory offset, and starting with 1 skips over memory.

    But basic starts on 1 since the first memory position indicates length.

    So in basic there are no zero termination and hence much much harder to cause buffer overruns.

    I have never really had a problem with it and as @endor said, matlab targets mathematicians and in their field you start on 1, doing anything else would be stupid for matlab alienating their primary target group.
  • 0
    Most of math algorithms for matrix are written in array starting at 1... That's why I always use Matlab first to test the validity of the algo before translating it to other languages like cpp.
Add Comment