MATLAB: I have a 2 by 26 matrix, how do i randomly select one of the rows and extract them

matrix array

shiptext= [22 6;38 21;24 36;2 30;6 2;15 31;22 15;24 15;10 33;29 11;32 15;29 21;31 4;25 27;29 27;10 11;35 17;15 14;22 20;21 29;23 22;3 22;33 9;8 38;10 4;11 29]

Best Answer

idr = randi(26,1,1);
row = shiptext(idr,:)