-1 and 1 matrix
이전 댓글 표시
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.........
채택된 답변
추가 답변 (2개)
Andrei Bobrov
2015년 5월 5일
-(-1).^(1:5)'*ones(1,5);
댓글 수: 3
Stephen23
2015년 5월 5일
Very nice!
Offroad Jeep
2015년 5월 5일
Andrei Bobrov
2015년 5월 5일
please accept my answer too! :)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!