Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
endor56665yTo 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 -
Voxera113885yThe 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. -
cho-uc18845yMost 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.
Related Rants
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.
rant
fuck matlab
matlab is just so annoying
matlab