Adjacency matrix formation from n*n matrix
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
SANJOY MONDAL
le 10 Juil 2019
Commenté : SANJOY MONDAL
le 11 Juil 2019
I have a matrix
A= [ 1 2
1 3
1 4
2 3
2 4
3 4 ]
and another weight matrix W= [4, 2, 3, 1] i.e weight of the first pair of A is 4, second pair is 2 etc.
i want to output in the form
edgeData = [1 2 4; 2 3 2; 1 3 3; 1 4 1];
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Sparse Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!