Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running adam_detrend_and_epoch #136

Closed
romquentin opened this issue Feb 25, 2021 · 2 comments
Closed

Error running adam_detrend_and_epoch #136

romquentin opened this issue Feb 25, 2021 · 2 comments

Comments

@romquentin
Copy link

Hello,

I am trying to run adam_detrend_and_epoch (Matlab R2018b, ADAM 1.13 and EEGLAB2021.0) on MEG data.

The function stops with this error:

[Undefined function or variable 'topcs'.

Error in nt_regw (line 78)
            if nargout>1; z(:,iChan)=x*(topcs*b(iChan,1:size(topcs,2))') + mn(:,iChan); end

Error in nt_detrend (line 87)
    [~,y]=nt_regw(x,r,w);

Error in detrend_and_epoch (line 236)
        [~, w2,~,regressline2] = nt_detrend(tmp,polynomial_order,w1); % then nth order with mask of previous
        step

Error in adam_detrend_and_epoch (line 148)
        detrend_and_epoch(datadir,filenames{cSubj},outputdir, start_epoch, end_epoch, polynomial_order,
        pad_length, start_mask, end_mask, mask_only_current, mask_bad_data, channelpool, remove_bad_chans,
        event_codes);

Error in script (line 23)
adam_detrend_and_epoch(cfg);](url)

Also, I have this warning several times before the function stops.

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND =  1.030416e-07. 
> In nt_regw (line 76)
  In nt_detrend (line 87)
  In detrend_and_epoch (line 236)
  In adam_detrend_and_epoch (line 148)
  In script (line 23)

Do you have an idea of what is going wrong?

Thank you very much!

@fahrenfort
Copy link
Owner

fahrenfort commented Feb 26, 2021 via email

@romquentin
Copy link
Author

Hi Johannes,

Thank you for your quick answer! I just tried one participant yet. I will run other participants and remove trials that create this bug if not too often.

Cheers,

Romain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants