获取数组的一部分的最有效(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]
Run Code Online (Sandbox Code Playgroud)
从 1 开始
myArray[4:结束]
我的数组[3:5]
http://samuelcolvin.github.io/JuliaByExample/
http://docs.julialang.org/en/latest/manual/
| 归档时间: |
|
| 查看次数: |
920 次 |
| 最近记录: |