How can I generate symmetric array?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Triveni
el 16 de Dic. de 2015
Respondida: Walter Roberson
el 16 de Dic. de 2015
I have an array. and i want to write it symmetry
A(:,:,k) = [ 1 2 3 4 5 6 7 8 9 10];
I want to write it as
A(:,:,k) = [ 1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5 4 3 2 1];
for k=1:N
value of A should change according perms or permutation. because perms is limited to 10.
please help.
0 comentarios
Respuesta aceptada
Walter Roberson
el 16 de Dic. de 2015
Write the asymmetric matrix first, just the first half. Then
A = cat(3,A, A(:,:,end:-1:1));
This will put a reversed copy of A after A
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!