28
Wiciaki
4y

*finishes MATLAB course*
My blanket when I wake up and think about my expired license which I won't renew:

Comments
  • 2
    Well, somebody's excited to not use a license. Was it a hard license to get?
  • 0
    You know matlab! Question for you!
    Is there a reason that array indexes start at 1 and not 0?
  • 0
    @cmarshall10450 To be fair: The famous TI graphical calculators don't do that, too. And nobody complains about that. I would argue that more people have used a TI calc than matlab.

    That point personally seems silly to me. The reason of counting from 0 is probably because in C arrays are a pointer to the first element and you increment the value by a given number of bytes * sizeof type.

    I'm not aware of any other reason for doing it this way and while it is totally normal for us, it isn't for many other people.

    Matlab focusing more mathematicians rather than programmers has not an inherently bad choice for choosing that.

    No offence, just want to clarify that bit.
  • 1
    @cmarshall10450 @LinusCDE because of vectors in math (which are indexed by numbers starting with 1)most languages specifying on statistics, and complex mathematical computation adapted that approach for their arrays. Because using an array to display your vector and constantly subtracting 1 to convert mathematical index to byte offset got annoying fast
  • 2
    @cmarshall10450
    Mathlab uses C++ libs and java for the front end. Deep down if counts from 0 but it shows that it counts from 1 to make mathematicians happy.
  • 0
    @Gregozor2121 @fuckwit @LinusCDE thanks for the clarification. It makes sense to start from 1 with mathemaitions being the main users. I just remember one of my colleagues having to convert some geological calculations written in matlab to python and he was really confused as to why the first element was always being ignored until he discovered the indexing difference.
  • 0
    Does that represent your boner ?
Add Comment