729
Just Terrible (mander.xyz)
you are viewing a single comment's thread
view the rest of the comments
[-] micnd90@hexbear.net 28 points 1 month ago* (last edited 1 month ago)

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.

[-] SomethingBurger@jlai.lu 14 points 1 month ago

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.

[-] flyos@jlai.lu 2 points 1 month ago

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

load more comments (2 replies)
load more comments (8 replies)
this post was submitted on 19 Oct 2024
729 points (98.7% liked)

Science Memes

11189 readers
3156 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.

This is a science community. We use the Dawkins definition of meme.



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