サイズが n*2n の "mirror" 行列(対称行列)を作成しましょう。
例: n=2 の場合、以下のような出力を返します。
m = [ 1 2 2 1
1 2 2 1 ]
n = 3 の場合、以下のようになります。
m = [ 1 2 3 3 2 1
1 2 3 3 2 1
1 2 3 3 2 1 ]- (英語版) Problem 943. "mirror" matrix https://www.mathworks.com/matlabcentral/cody/problems/943
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers320
Suggested Problems
-
Return the 3n+1 sequence for n
8511 Solvers
-
2609 Solvers
-
Check if number exists in vector
14294 Solvers
-
401 Solvers
-
Calculate the average value of the elements in the array
1807 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!