Excluding Bad Chann...
Clear all

Excluding Bad Channels with NIRS Brain AnalyzIR (aka Ted Huppert's toolbox)

4 Posts
4 Users
0 Reactions
Posts: 1
Topic starter
New Member
Joined: 2 years ago

Hi guys,

I am really liking to use Ted's toolbox in my analyses. My only problem is that I don't know how (and if it's even possible) to exclude single channels from the analysis. Does anybody know how to do it? 



Topic Tags
3 Replies
Posts: 4
Active Member
Joined: 2 years ago

Hi Armando,

You just need to simply change the specific bad channel to Nan at the beginning then the toolbox automatically excludes this channel. So you should be good to go.

1 Reply
Joined: 1 year ago

Active Member
Posts: 4


Hi Ali,

Could you elaborate on what specifically needs to be set to NaN? Is it the column of data that corresponds to the channel you are looking to discard, the corresponding channel in the table, or something different?


Posts: 6
Active Member
Joined: 1 year ago

Dear Ali,

I tried a lot to load .snirf in the nirstoolbox. But the problem is that in the function the '.snirf' is not defined. After I specify .'snirf' (In loadDirectory: fileExt = {'.nirs','.oxy3','.oxy4','.wl1','_MES_*.csv','_fnirs.csv','nir5','TXT','.nir','.snirf'};), after that:

the function recognizes the ".snirf" location but still, there are problems regarding the '.snirf' data reading in the "loadDirectory".

I faced this error:

Warning: error reading file: D:\FRESH\Data\FRESH-Audio\sub-17\ses-01\nirs\sub-17_ses-01_task-FRESHAUDIO_nirs.snirf
> In (line 55)
Index exceeds matrix dimensions.

It is also better to mention that the toolbox is dependent on the MATLAB version. As an example, the function "contains" doesn't exist for MATLAB version's of 2016a and earlier. 

What MATLAB version do you suggest?


Best regards,