Subtracting string/character values in cell arrays
4 次查看(过去 30 天)
显示 更早的评论
This is a portion of a cell array A, columns 2:5 are trials 1:4
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228484/image.png)
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!