Matrix with different incremental runs - MATLAB Cody - MATLAB Central

Problem 794. Matrix with different incremental runs

Difficulty:Rate

Given a vector of positive integers

a = [ 3 2 4 ];

create the matrix where the i th column contains the vector 1:a(i) possibly padded with zeros:

b = [ 1 1 1
      2 2 2
      3 0 3
      0 0 4 ];

Solution Stats

55.73% Correct | 44.27% Incorrect
Last Solution submitted on Mar 17, 2025

Problem Comments

Solution Comments

Show comments

Group

Matrix Manipulation I Image
Matrix Manipulation I
  • 16 Problems
  • 98 Finishers

Problem Recent Solvers524

Community Treasure Hunt

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

Start Hunting!
Go to top of page