I have a cell type big-variable sorted out by FIRM (A(:,2)) and I want to erase all the rows in which the same firm doesn’t appear at least 5 times in a row. In this example, A:
FIRM 1997 'ABDR' 0,56 464 1641 19970224 1997 'ABDR' 0,65 229 9208 19970424 1997 'ABDR' 0,55 125 31867 19970218 1997 'ABDR' 0,53 31 33103 19970206 1997 'ABDR' 0,70 464 46008 19971023 1997 'ABD' 0,06 435 8077 19970311 1997 'ABD' 0,00 1503 44994 19970804 1997 'ABFI' 2,07 1549 46532 19971209
I would like to get, A:
1997 'ABDR' 0,56 464 1641 199702241997 'ABDR' 0,65 229 9208 199704241997 'ABDR' 0,55 125 31867 199702181997 'ABDR' 0,53 31 33103 199702061997 'ABDR' 0,70 464 46008 19971023
Can someone help me please? Thanks a lot.
Best Answer