Back to the main page.

Bug 18 - bug in PSI calculation in connectivityanalysis

Status CLOSED FIXED
Reported 2010-01-14 15:34:00 +0100
Modified 2010-12-08 11:15:51 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P2 major
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Andre Bastos - 2010-01-14 15:34:39 +0100

When I call connectivityanalysis on a 2 by 2 square matrix, I get the error: ??? Index exceeds matrix dimensions. Error in ==> ft_connectivityanalysis>coupling_psi at 524 p1 = abs(reshape(input(j,cfg.powindx(:,1),:,:,:), siz(2:end))); Error in ==> ft_connectivityanalysis at 321 [datout, varout, nrpt, phasediff] = coupling_psi(tmpcfg, data.(inparam), hasrpt, hasjack); Error in ==> FEF_par at 199 tmpIn = ft_connectivityanalysis(psi_cfg,tmpInfreq);


Andre Bastos - 2010-01-14 15:36:40 +0100

This is for the PSI calculation. Function works for coherence and granger.


Jan-Mathijs Schoffelen - 2010-01-15 08:25:59 +0100

Could you be a bit more specific about the exact input to the main function? Generally, you don't call it with a '2 by 2 square matrix' but with a freq-structure containing fourierspctrm? or crsspctrm?


Jan-Mathijs Schoffelen - 2010-01-15 09:09:20 +0100

(In reply to comment #0) > When I call connectivityanalysis on a 2 by 2 square matrix, I get the error: > > ??? Index exceeds matrix dimensions. > > Error in ==> ft_connectivityanalysis>coupling_psi at 524 > p1 = abs(reshape(input(j,cfg.powindx(:,1),:,:,:), siz(2:end))); > > Error in ==> ft_connectivityanalysis at 321 > [datout, varout, nrpt, phasediff] = coupling_psi(tmpcfg, data.(inparam), > hasrpt, hasjack); > > Error in ==> FEF_par at 199 > tmpIn = ft_connectivityanalysis(psi_cfg,tmpInfreq); > Could you be a bit more specific about the exact input to the main function? Generally, you don't call it with a '2 by 2 square matrix' but with a freq-structure containing fourierspctrm? or crsspctrm?


Jan-Mathijs Schoffelen - 2010-01-18 13:29:30 +0100

updated the code, seems to work now.