Hi Mike, Hi all,

Hope you’re doing fine and healthy.

I wonder if I could get some help from the Matlab-savvy from the group.

I’m trying to compute the induced power for some data. I computed the power for a set of trials for a given condition and for each subject, and I computed the ERP also for each condition and subject. I’m trying to figure out how to subtract the ERP from the single trials.

My matrices are:

[64 35] channels x time for the ERP and

[225 64 20 35] trials x channels x frequencies x time for the allTrials matrix.

My guess is that I could use some repmat somewhere to make the trick, but I’m a bit overwhelmed with the dimensions (it’s only 4 but still ). Also, I’m not sure how to deal with the frequency dimension between the channels and time dimension.

Has anybody done this and could give me a hand?

Any hint will be appreciated!

best,

Jose