Generating random matrix in Matlab with value from another matrix -
i have 113*401 matrix example x matrix. want create random matrix 100 times have 11300*401 matrix. important thing value taken main matrix x randomly.
this code chooses elements of result matrix bfrom whole input matrix x. therefore columns of b aren't permutations of columns of x.
x = rand(113,401); % sample matrix % generate random indices , use them pull values b = x(randi([1 numel(x)],11300,401));
Comments
Post a Comment