【问题标题】:Matlab: access ith-element returns index exceeds matrix dimensionsMatlab:访问第 i 个元素返回索引超过矩阵维度
【发布时间】:2017-06-10 12:59:48
【问题描述】:

我想将列向量的一个元素复制到另一个。但是我不明白如何访问第 i 个元素。这是我尝试过的:

>> I1_inliers

I1_inliers = 

  1300×1 SURFPoints array with properties:

              Scale: [1×1300 single]
    SignOfLaplacian: [1×1300 int8]
        Orientation: [1×1300 single]
           Location: [1300×2 single]
             Metric: [1×1300 single]
              Count: 1300

>> I1_inliers(2)
Index exceeds matrix dimensions.

【问题讨论】:

    标签: matlab class indexing


    【解决方案1】:

    你有一个 1x1 结构。如果你想要数组中的第二个元素,你需要做

    I1_inliers.Scale(2)
    

    【讨论】:

    • 那么 1300×1 SURFPoints 数组是什么?我想访问第二个 SURFPoints 以便将其复制到另一个变量中
    猜你喜欢
    • 2012-09-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-24
    • 2012-07-26
    相关资源
    最近更新 更多