Is there any way we start with all ones vector of length 10 and need to increment it in steps till we have a vector of length 10 with each element equal to 30

we start with a vector [1 1 1 1 1 1 1 1 1 1 ] and then need to get to the vector [30 30 30 30 30 30 30 30 30 30] in steps of one.i don't need the whole array at once just need one vector at a time. i think the question wasnt clear enough. The vector should start as [1 1 1 1 1 1 1 1 1 1] then it should go as [1.....1 2] [1....1 3] and so on till[1......1 30] ,then it should become[1....1 2 1]...[1...1 2 30],[1....1 3 1]..[1...1 3 30]....[1...1 30 30]....[1...1 30 30 30] and so on and go to [30 30 30 30 30 30 30 30 30 30].

Answers (1)

Tags

Asked:

on 12 Nov 2015

Edited:

on 12 Nov 2015

Community Treasure Hunt

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

Start Hunting!