matlab - vector of indices -
i have 10x10 matrix called a:
i have vector of column numbers:
c = [ 2, 6, 8 ];
i have vector of row numbers:
r = [1; 3; 7];
the column numbers correspond each row. i.e. column 1 looking @ row numbers given r, column 3 looking @ row numbers given r , on.
i want replace exact locations in other number 13.
i.e. each of these locations in matrix a:
(1,2) (1,6) (1,8), (3,2), (3, 6), (3,8) want insert 13.
how achieve above ?
you can a(r,c) = 13
.......
Comments
Post a Comment