Afficient way to create "sum matrix"
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Orr Streicher
am 1 Feb. 2021
Bearbeitet: Orr Streicher
am 1 Feb. 2021
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 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Orr Streicher
am 1 Feb. 2021
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!