Is it possible to replace some rows of a matrix for specific vectors (in my case, random vectors) without using a loop in MATLAB?
Given:
A = [1 2 3; 4 5 6; 7 8 9; 10 11 12] I want to replace A([2 3],:) with, for instance, v = rand(1,3) but I really want that each chosen row (in this case 2 and 3) of A is randomly generated.
The problem with this is that I want to generalize it to do it for every given matrix A without using a loop in MATLAB. Is it possible?
Thank you.
Rui Semeano