logo
  • 教程列表
  • SO官方文档
  • sub2ind
    • 将下标转换为线性索引
    • 坑瀑布
  1. StackOverflow 文档
  2. Julia Language 教程
  3. sub2ind
  4. 将下标转换为线性索引

将下标转换为线性索引

Created: November-22, 2018

julia> sub2ind((3,3), 1, 1)
1

julia> sub2ind((3,3), 1, 2)
4

julia> sub2ind((3,3), 2, 1)
2

julia> sub2ind((3,3), [1,1,2], [1,2,1])
3-element Array{Int64,1}:
 1
 4
 2
  • 坑瀑布
  • sub2ind

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明