MATLAB Answers

Subtracting string/character values in cell arrays

1 view (last 30 days)
Z Liang
Z Liang on 10 Jul 2019
This is a portion of a cell array A, columns 2:5 are trials 1:4
I believe each cell has a character/string, i.e. A{1,3} = 'F7-CS2'. (Also not sure if there is a difference between character vs string, or if it matters)
My task is to find a channel that was recording over all 4 trials. For example, Channel 1 during trial 1, A{1,2} = 'FP1-F7'; but during trial 2 it has changed. However, during trial 2, the same "Channel" of FP1-F7 can be obtained as the difference between A{5,3} = 'FP1-CS2' and A{1,3} = 'F7-CS2'. So in this way FP1-F7 is still being recorded in trial 2, just via different channels. The same applies for trial 3, and finally in trial 4 we are back to initial conditions.
I truly cannot figure out a smart/efficient way to do this through matlab. Would really appreciate some help, thanks!

  0 Comments

Sign in to comment.

Answers (0)

Sign in to answer this question.