-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!