Problem 2290. チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。
例:
入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1]
- (英語版) Problem 4. Make a checkerboard matrix https://www.mathworks.com/matlabcentral/cody/problems/4-make-a-checkerboard-matrix
Solution Stats
Problem Comments
-
1 Comment
Noriko Hounoki
on 9 Jul 2017
日本語での出題ありがとうございます(うれし涙)
Solution Comments
Show commentsProblem Recent Solvers350
Suggested Problems
-
Maximum running product for a string of numbers
2103 Solvers
-
Reverse the elements of an array
989 Solvers
-
find the maximum element of the matrix
480 Solvers
-
ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
521 Solvers
-
342 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!