Search code examples
arraysjuliamatrix-indexing

Numbering of array indices in Julia


I seem to find that I get an bounds error when I try to reference array[0]. So it seems that julia has elected to necessarily use the same convention that MATLAB uses, starting the indices from 1. Is this true? Any reason for that choice?


Solution

  • Yes, arrays are indexed from 1