Skip to content

MicroStats: calculation of statistics #942

Closed

Description

@seethakhandige96-png

Description

[EEGLAB error in function MicroStats() at line 167:
Undefined function 'nanmean' for input arguments of type 'single'
Attach a link to Dropbox or Google Drive with screenshots and your data if possible.
]


#### Steps to Reproduce
  1. [Tools]
  2. [Microstate analysis toolbox]
  3. [Use labels obtained from>Backfitting prototypes to EEG>Ok]

#### Expected behavior: [*To get the microstate statistics of duration, occurrence etc.*]
#### Actual behavior: [*Error message pop-up*]
#### Versions
OS version [Windows 11 23H2]
Matlab version [R2026a]
EEGLAB version [EEGLAB v2026.0.0]
Microstate Analysis Toolbox (Poulsen 2018) [MST v1.0]
Image

Activity

  1. ericaflaten commented on Jun 30, 2026

    @ericaflaten

    Yes I am having a similar issue but with running any EEGlab function that uses 'nanmean' instead of 'mean' with the argument 'omitnan'. I just updated my matlab to 2026a, and my EEGLab is the most recent version as well (2026.0.0). Any time I try to run my preprocessing function that calls to EEG lab I get the following error:

    Unrecognized function or variable 'nanmean'.

    Error in eega_tRejCorrCh (line 102)
    avgcorrs = nanmean(corrs);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in eega_tArtifacts (line 202)
    [ ~, bct ] = fhandle( EEG, inputs{:});
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    Error in preprocessing_fun (line 388)
    EEG = eega_tArtifacts(EEG, Ppp.ArtBadEl, 'KeepRejPre', 1);
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  2. arnodelorme commented on Oct 2, 2026

    @arnodelorme
    Collaborator

    This was moved to the APICE issue

    neurokidslab/eeg_preprocessing#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions