I have an array of 10 by 6 and i want to randomly select rows from the array ?

I have an array which is 10 by 6. the array is data. I want to be able to select random rows from the array and to be assigned to ii and jj. And also want to make sure that ii and jj are never the same.I have done that part but i am having difficulty selecting the random rows from the array.
pair = [];
for ii =1:p
for jj=1:p
if (ii~=jj)
newPair =[ii,jj];
pair= [pair; newPair];
end
end
end

1 Comment

You already asked this question or one very similar in which someone is attempting to provide you with an answer. Just expand on the question in the other thread since it is not closed and it is essentially just an extension of an unclear question!

Sign in to comment.

 Accepted Answer

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

ME
on 5 Mar 2015

Commented:

on 5 Mar 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!