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.
我有一个小问题:
我有一个矩阵A像 [1 2;4 1]
和像 [0 1 0 1 1 0 1 2] 这样的向量ref
Matrix A的值是ref的索引。
最后我想要这个解决方案 [0 1;1 0] (在位置(1,1)的矩阵A中是 1,所以在位置(1,1)的解决方案中应该是位置 1的ref的值,并且很快)
谢谢你的帮助
简单的索引:
>> ref(A) ans = 0 1 1 0