I have a cell array named B, I want to use all of the cells of it (inside of each cell I have a double matrix, for instance, the first cell is 30800*4 which is the timepoints of 4 channels) so I call it by " sig=B(:,:); " and " sig=B(:,:,:); " but I’ve got an error. I will attach the screenshot. Please let me know my mistake.
From this screenshot it is not clear what shape B is, what the items in B represent, or what the error message is.
Also, in your code it looks like your will be overwriting subs_a1.
It might be easier if you instead copy/paste the code with the code format string (like this), surrounded by the “`” sign (you can also highlight your text and press the button that looks like this </> to do that formatting).
(%% Gathering all subjects in cd=1 EC1 Active
% Load EC1, Active
cd=1; % cd1= EC1 Active
% Design Filter for alpha
% bandpass butterworth filter
wn= [fl fh]/(fs/2);
% Apply designed filter
Also, I think this code is not valid enough to understand the whole code. Needless to mention, you sent me the link (Complex Systems Group at URJC) to do step by step. I exactly want to do these steps but I really got baffled. Would you please guide me or link me with some one who can guide me in details.
The third input to filtfilt, which you named sig, must be an array or matrix, where each timeseries you want to filter is represented as a column (unless you decide to only filter one signal at a time, in which case in can be a single row vector).