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

FMRIB: EEGLAB error in function fmrib_fastr() at line 882 #5

Open
nucleuscub opened this issue Dec 10, 2019 · 0 comments
Open

FMRIB: EEGLAB error in function fmrib_fastr() at line 882 #5

nucleuscub opened this issue Dec 10, 2019 · 0 comments

Comments

@nucleuscub
Copy link
Member

Issue transferred from Bugzilla (Bug 692)

Makoto 2008-11-13 18:49:40 PST
Hi arno. Here is the new one I found when using FMRIB implemented in EEGLAB2008Oct. The error message is as follows:

EEGLAB error in function fmrib_fastr() at line 882
Index exceeds matrix dimensions

The line 882 is

[apc,ascore,asvar]=pca_calc(pcamat(1:pccount,:)');

where, in my case,

pcamat = <28x51001 double>
pccount = 29

The lines from 870 to 879 are as follows:

        for s=starts+1:lasts-1
            % construct PCAMAT
            if skcount==pick(pccount)
                pcamat(pccount,:)=...
                    Ipca(secmarker(s)-pre_peak:...
                    secmarker(s)+max_postpeak);
                pccount=pccount+1;
            end
            skcount=skcount+1;
        end

It seems pccouont+1 AFTER calculating pcamat(pccount,:).
Thus, pccount is one too many compared to the number of rows of pcamat whenever the program go out from this loop.

So I added a change at the line 882

[apc,ascore,asvar]=pca_calc(pcamat(1*(pccount-1),*)');

and now it seems working. Please check if it is ok.

Strange thing is that I must have used the same version of FMRIB half a year ago but did not encounter the same error. I have no idea how this happened.

Makoto

[reply] [−]Comment 1Makoto 2008-11-13 18:56:44 PST
Sorry for the mistype. The modified Line 882 is

[apc,ascore,asvar]=pca_calc(pcamat(1:(pccount-1),:)');

[reply] [−]Comment 2Arnaud Delorme 2008-11-13 19:02:30 PST
I am adding Rami to the list of Bug recipient for this problem. He is the developper of FMRIB. Hopefully he can fix the problem.

Best,

Arno

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

1 participant