I am trying to find where two elements of a vector share the same value. As well as put it through an if statement to change different things in my poker GUI (which checks your hand and the river to tell you what hand exists on the table). My matlab skills are basic so some explanation would be helpful!
for i=1:7 box(i)=0endbox(1)=str2double(get(handles.edit1,'string'));%Continues to fill to the element of box(7)
box(7)=str2double(get(handles.edit7,'string'));box=sort(box);%Say that box=[1 1 3 8 9 11 12]
if box(1)==box(2) set(handles.Hand,'string','One Pair')end
Best Answer