i have to turn a list of numbers (ex. 4 1 3 2) into a list of the same numbers but with multiple copies of each number (and they have to be in the specific order) (ex. 4 4 4 4 1 1 1 1 3 3 3 3 2 2 2 2)
right now my plan is to make a 4x1 matrix of each one ( like a = [ 4 4 4 4]) but i'm having trouble making this run for every number in the list. i made a function that takes in the value (4) and makes a matrix of it that contains 4 copies of it in a 4x1 through a loop.
can i make a loop that runs this copy for each number in the list?
aftewrads i think i can use vertcat to combine all the matrices into the list that i'm looking for.
thanks!