how to generate symmetric matrix with zero-one elements, complexity index of this matrix (number of ones / (size )^2) = any number from zero to 1 and diagonal equal ones
Mostrar comentarios más antiguos
how to generate symmetric matrix with zero-one elements, complexity index of this matrix (number of ones / (size )^2) = any number from zero to 1 and diagonal equal ones???
1 comentario
Star Strider
el 23 de En. de 2016
@Hayam — I thought you might be the only person who wanted the matrix, but it’s gotten several downloads in the 8 hours since I uploaded it!
Respuesta aceptada
Más respuestas (1)
A = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5];
symmetry = [A, flip(A)];
if you need diagonal as ones use
B =diag(symmetry) ==ones;
1 comentario
Hayam Wahdan
el 22 de En. de 2016
Categorías
Más información sobre Choose a Solver en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!