construct matrix with identical rows - MATLAB Cody - MATLAB Central

Problem 2104. construct matrix with identical rows

Difficulty:Rate

Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x.

Example

 L = 5

The resulting answer is:

 [1:10;
  1:10;
  1:10; 
  1:10;
  1:10]

Solution Stats

63.87% Correct | 36.13% Incorrect
Last Solution submitted on Sep 16, 2025

Problem Comments

Solution Comments

Show comments
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers201

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!