How to get a vector of numbers from a matrix for a list of selected locations?
1 次查看(过去 30 天)
显示 更早的评论
Hi,
Suppose I have a matrix of numbers/logicals.
I have a set of pairs of indices (i,j) pointing to some matrix entries .
I want a vector of numbers/logicals from the matrix in these (i,j) indices.
Of course, I can write a for loop and get the number/logical in each matrix entry.
Is there a more efficient way to get this done? Without a loop?
Thanks,
Alon
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!