整数 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
Solution Comments
Show comments
Loading...
Problem Recent Solvers392
Suggested Problems
-
824 Solvers
-
Create matrix of replicated elements
395 Solvers
-
7964 Solvers
-
Check that number is whole number
5186 Solvers
-
Flip the vector from right to left
10665 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!
日本語での出題ありがとうございます(うれし涙)