this post was submitted on 19 Oct 2024
725 points (98.7% liked)
Science Memes
10850 readers
2356 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
- Don't throw mud. Behave like an intellectual and remember the human.
- Keep it rooted (on topic).
- No spam.
- 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
- !abiogenesis@mander.xyz
- !animal-behavior@mander.xyz
- !anthropology@mander.xyz
- !arachnology@mander.xyz
- !balconygardening@slrpnk.net
- !biodiversity@mander.xyz
- !biology@mander.xyz
- !biophysics@mander.xyz
- !botany@mander.xyz
- !ecology@mander.xyz
- !entomology@mander.xyz
- !fermentation@mander.xyz
- !herpetology@mander.xyz
- !houseplants@mander.xyz
- !medicine@mander.xyz
- !microscopy@mander.xyz
- !mycology@mander.xyz
- !nudibranchs@mander.xyz
- !nutrition@mander.xyz
- !palaeoecology@mander.xyz
- !palaeontology@mander.xyz
- !photosynthesis@mander.xyz
- !plantid@mander.xyz
- !plants@mander.xyz
- !reptiles and amphibians@mander.xyz
Physical Sciences
- !astronomy@mander.xyz
- !chemistry@mander.xyz
- !earthscience@mander.xyz
- !geography@mander.xyz
- !geospatial@mander.xyz
- !nuclear@mander.xyz
- !physics@mander.xyz
- !quantum-computing@mander.xyz
- !spectroscopy@mander.xyz
Humanities and Social Sciences
Practical and Applied Sciences
- !exercise-and sports-science@mander.xyz
- !gardening@mander.xyz
- !self sufficiency@mander.xyz
- !soilscience@slrpnk.net
- !terrariums@mander.xyz
- !timelapse@mander.xyz
Memes
Miscellaneous
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.
Is there a reason for the convention other than that's how most people count? (Which is a perfectly fine reason, I'm just curious)
When you say the first element of a matrix, first implies one and not zero. This is how linear algebra was invented (on paper, by a human mathematician), taught, and passed down to fellow humans.
Starting indexes at zero stem from the lineage of C programming and binary nature of computer. For example,
This is why, math and physics people who learn linear algebra and matrix calculus learn to index at 1 (on a piece of paper) while computer science programmers index at 0.
Is linear algebra older than 0? Hang on (no, it is not, formalised in 17th century)
In my CS course, at least, it was treated as "engineering", so we did both linear algebra and C programming. For everyone counting from 1 was more natural and the C method had to be taught a few times throughout the course (starting with java loops, which wasn't used for malloc, OOP was probably the first unit anyone did for CS). As a habit it tended to stick even where we didn't really use it (or in languages that don't, e.g. lua), given how grueling C programming was and the other languages that were downstream of it.
I guess you could analogise things like saying "17th century" is 1600-1699 (first century is 0001 to 0099, I guess), in CS you are counting the very start of a thing (e.g. how many apple-widths to get to the first apple), vs the more common how many apples to have gotten the first apple. Or something, idk,
I'm drunk and avoiding housework, sorry