Random row from matrix with row number Matlab -
Matlab How to choose a random line from the matrix, and the selected number of rows? The designated matrix ICO Choosing a random line from the matrix M is
4x3 as follows:
-21.8318 19.2251 -16.0000 -6.2788 8.6988 -10.0000 1.5553 -0.8041 - 2.0000 17.6843 - 13.0848 0.3000
M is my question simple (which is, in fact, no big deal) with its line number?
1
randi use
and
M , and then use it in the index in
M :
ind = randi (size (m, 1)); % // line number row = m (ind, :); % // related line
Comments
Post a Comment