Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 1258. Create matrix of replicated elements

Created by Jeremy

Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x.

Example: Input: repl_mat(2, 2, 5) Output: [2, 2, 2, 2, 2; 2, 2, 2, 2, 2];

Tags

Problem Group

Solution Statistics

118 correct solutions 15 incorrect solutions
Last solution submitted on Sep 12, 2014