标签: arrays julia
获取阵列的一部分最有效(Julia)的方法是什么?请记住,Julia指数从1开始而不是0
>>> myArray = [1,2,3,4,5,6,7,8] >>> #from an index to the last index? >>> myArray[4th to last] [4,5,6,7,8] >>> #from an index to another index? >>> myArray[3rd to 5th] [3,4,5]
答案 0 :(得分:4)
从1开始
myArray的[4:结束]
myArray的[3:5]
http://samuelcolvin.github.io/JuliaByExample/
http://docs.julialang.org/en/latest/manual/