Hello! I have a cell array which contains indices from another cell array.Lets say for example
TES={[1;2;3;4;5];[12;13;14];[1;2;3;4;8;9;10;22;23;24];[4;5;6;8;9];[5;6;7]};
Where the indices have no jump at their sequence (cases 1,2 & 5) I want to keep the cell as it is. Where the jump is smaller than 2 I also want to keep the cell as it is(cell 4) But where there is a jump(or more) greater than 2 I need to split each cell into other cells.Their Number should be (jumbs+1).
The desirable result is
TES_new={[1;2;3;4;5];[12;13;14];[1;2;3;4];[8;9;10];[22;23;24];[4;5;6;8;9];[5;6;7]};
Best Answer