I am trying to create a sub-function for a EEG analysis program. Basically the data is a 1×892 matrix of data with numbers ranging from 1 to 99. This portion that i am trying to deal with has two parts:
1. Go through the data and find the value 9, whenever it occurs in the 1×892 matrix. I have already done this part.
2. Replace the numbers surrounding the identified number 9. So if there was data with 9 in it follows, [… a b c d 9 e f g h i j k…]. Basically after the part of identifying the number 9, the letters a through d need to be replaced with 5,6,7,8 respectively. The letters e through k need to be replaced with 10,11,12,13,14,15,16, respectively. I am struck on this part and i would really appreciate any help.
P.s, the way this data is arranged, that we get from an EEG, a 9 will not overlap with another 9.
Best Answer