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.
如何在 R 中创建这个(matlab)矩阵
ABC = {[1 1 3 ] [4 5 6 ] [1 1 2 ] [1 1 2 ] [1 32 2 ] [2 3 1 ] };
这是一个array输入R:
array
R
ABC <- array(c(1,1,1, 1,1,32, 3,2,2, 4,1,2, 5,1,3, 6,2,1), dim=c(3,3,2)) > ABC , , 1 [,1] [,2] [,3] [1,] 1 1 3 [2,] 1 1 2 [3,] 1 32 2 , , 2 [,1] [,2] [,3] [1,] 4 5 6 [2,] 1 1 2 [3,] 2 3 1
(假设我的结构正确。自从我上次接触以来已经有几十年了matlab。)
matlab