-1 and 1 matrix
Mostrar comentarios más antiguos
Hello All,
I want to create a n X n matrix with 1row 1, 2nd row -1, 3rd row 1 , 4th row -1 and so on..... can anyone please guide me .......... thanks.........
Respuesta aceptada
Más respuestas (2)
Andrei Bobrov
el 5 de Mayo de 2015
-(-1).^(1:5)'*ones(1,5);
3 comentarios
Stephen23
el 5 de Mayo de 2015
Very nice!
Offroad Jeep
el 5 de Mayo de 2015
Andrei Bobrov
el 5 de Mayo de 2015
please accept my answer too! :)
Categorías
Más información sobre Logical 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!