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

56.13% Correct | 43.87% Incorrect
Last Solution submitted on May 05, 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
3

Group

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

Problem Recent Solvers535

Community Treasure Hunt

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

Start Hunting!
Go to top of page