Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Mata 中有一个尺寸为 (50,1) 的向量。我想知道如何获得这个向量的最小数量的行名。
你尝试了什么?这里的最低标准是您向我们展示您尝试过的内容并解释为什么它不起作用。
这是一种方法。请注意,行在 Mata 中没有名称;您的随机数可能不同;并且通常两行或多行可以具有相同的最小值。
mata : y = rnormal(50, 1, 0, 1) : select((1::50), (y :== min(y))) 11 : min(y) -2.427600583 : y[11] -2.427600583