-1 and 1 matrix
Ältere Kommentare anzeigen
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.........
Akzeptierte Antwort
Weitere Antworten (2)
Andrei Bobrov
am 5 Mai 2015
-(-1).^(1:5)'*ones(1,5);
3 Kommentare
Stephen23
am 5 Mai 2015
Very nice!
Offroad Jeep
am 5 Mai 2015
Andrei Bobrov
am 5 Mai 2015
please accept my answer too! :)
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!