Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 02-arrays.md added info that Matlab starts indexes on 1, and a… #260

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions episodes/02-arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@
ans = 38
```

Indices are provided as (row, column). So the index `(5, 6)` selects the element
on the fifth row and sixth column.
Indices are provided as (row, column). In Matlab, indexing starts at 1.
So the index `(5, 6)` selects the element on the fifth row and sixth column.

![](fig/Matlab_Array_Indexes.svg){alt='8-by-8 matrix with rows for each label and column indicating their number. Rows numbered 1 to 8, as are columns'}

Check warning on line 65 in episodes/02-arrays.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[missing file]: [](fig/Matlab_Array_Indexes.svg)

An index like `(5, 6)` selects a single element of
an array, but we can also access sections of the matrix, or [slices](../learners/reference.md#slice).
Expand Down
Loading