How to fix? ArgumentError: row indices I[k] must satisfy 1 <= I[k] <= m

Julia uses 1-based indexing by default. So try initializing with s = [...] .+ 1 and e = [...] .+ 1

2 Likes