From: Gumah on 19 Apr 2010 23:58 Hi all lets say we have a=[1 2 3 4 5 10 15 20 21 22 23 24 30 37 40] This matrix has two kinds of elements; the elements which follow specific order such [ 1 2 3 4 5] and [20 21 22 23 24 ] and the elements that not follow any order such[10 15 20 ]... I need to count how many times I have elements that follow i2=i1+1 order and the length of that elements.. in this example.. in matrix (a) I have elements that follow i2=i1+1 order two times .. the first time with 5 elements length the second time with 3 elements length Any body know how to make a code to do that ??
From: Gumah on 20 Apr 2010 00:02 On Apr 20, 11:58 am, Gumah <alrjele2...(a)gmail.com> wrote: > Hi all > lets say we have a=[1 2 3 4 5 10 15 20 21 22 23 24 30 37 40] > This matrix has two kinds of elements; the elements which follow > specific order such [ 1 2 3 4 5] and [20 21 22 23 24 ] and the > elements that not follow any order such[10 15 20 ]... I need to count > how many times I have elements that follow i2=i1+1 order and the > length of that elements.. in this example.. in matrix (a) I have > elements that follow i2=i1+1 order two times .. the first time with 5 > elements length the second time with 3 elements length > Any body know how to make a code to do that ?? correction !! the first time with 5 elements length the second time with 5 elements length also
|
Pages: 1 Prev: Clusters by k means based on sensor measurements Next: Trouble with textscan |