I generate an 8x8 A matrix below. I also have an 8x1 vector B containing random integer numbers from 1 to 8. And, I have an 8x1 C vector containing numbers obtained below. How can I, for all rows of A, populate those columns of A starting at B to the end, with values of corresponding rows in C without going through a loop (i.e. vectorized).
B = randi([1 8], 8, 1);