チェッカーボードを作ろう - MATLAB Cody - MATLAB Central

Problem 2290. チェッカーボードを作ろう

Difficulty:Rate

整数 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]

Solution Stats

41.04% Correct | 58.96% Incorrect
Last Solution submitted on May 08, 2025

Problem Comments

Solution Comments

Show comments
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers377

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page