this post was submitted on 19 Oct 2024
727 points (98.8% liked)

Science Memes

10799 readers
1661 users here now

Welcome to c/science_memes @ Mander.xyz!

A place for majestic STEMLORD peacocking, as well as memes about the realities of working in a lab.



Rules

  1. Don't throw mud. Behave like an intellectual and remember the human.
  2. Keep it rooted (on topic).
  3. No spam.
  4. Infographics welcome, get schooled.


Research Committee

Other Mander Communities

Science and Research

Biology and Life Sciences

Physical Sciences

Humanities and Social Sciences

Practical and Applied Sciences

Memes

Miscellaneous

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 27 points 1 week ago* (last edited 1 week ago) (10 children)

MATLAB is for matrix calcs. Matrix indices start at 1, fight me. Given a matrix X of m x n size, you write

Matlab has many issues, amongst other accessibility (which can be remedied by piracy), closed-software, but as a program designed to do computational matrix manipulation, starting at index 1 is literally correct. This is how you learn matrix indices in intro linear algebra. How is it make sense then you use a software to assist computation and start indexing at 0, while you write the equations and indices on a piece of paper you start at 1. CS majors go home.

[–] [email protected] 14 points 1 week ago (3 children)

Starting at 0 makes sense in low-level languages like C because it's not really an index but a memory offset. Higher level languages like SQL or MatLab correctly start at 1 because they abstract memory management away. Other languages without manual memory management, such as JavaScript or Python, are incorrectly starting their arrays at 0.

[–] [email protected] 2 points 1 week ago

So, I'm not alone... Thank you!

load more comments (2 replies)
load more comments (8 replies)