Afficient way to create "sum matrix"
1 次查看(过去 30 天)
显示 更早的评论
Hi,
So i would like to implement a function that get a vector as input lets :
g=[g1, g2, g3]
and return a matrix that contain a sum of pairs: so for g , the output matrix G contain 9 elements the G(i,j)=g(i)+g(j)
The problem is that g will be very large vector.
Does anyone know an efficient way to do that with sparse matrices
Thanks
0 个评论
采纳的回答
更多回答(1 个)
Orr Streicher
2021-2-1
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!