- #1

Ephant

- 148

- 2

https://sccn.ucsd.edu/eeglab/index.php

"EEGLAB is an interactive Matlab toolbox for processing continuous and event-related EEG, MEG and other electrophysiological data incorporating independent component analysis (ICA), time/frequency analysis, artifact rejection, event-related statistics, and several useful modes of visualization of the averaged and single-trial data. EEGLAB runs under Linux, Unix, Windows, and Mac OS X."

Well. I need to use Welsh FFT plot using my 1000Hz bandwidth data (GDF format) and the EEGlab running under Matlab can load it and then use its ALLEEG variable to do the Welsh plot (like FFT without the noise floor detail and using other ways of computing the bins).

I found this website and tried following the codes for plotting Matcad FFT Plot using ALLEGG in EEGLab

https://devcodef1.com/news/1232023/matlab-fft-plot-alleeg

After loading EEGlab and the GDF data. I tried running the codes in the web site:

Code:

```
ALLEEG = pop_loadset('ALLEEG.set');
chans = find(strcmp(ALLEEG.chanlocs(:,3),'1'));
[~,~,~,~,~,~,~,~,spec] = spectopo(ALLEEG,chans,1,256,1);
plot(spec.freq,spec.powrel);
xlabel('Frequency (Hz)');
ylabel('Power');
```

But the codes returned errors (see attachments)

"Error using spectopo Too many output arguments."

When I changed the [~,~,~,~,~,~,~,~,spec] to [~,~,~,~,spec]. No more error. Why is there no more error with only 4 "~,"?

Instead there is another error: (see screenshot).

When I checked out line 224. Here is the inside of it.

What kind of error is that and how do you fix that?

Thank you.