[FieldTrip] fieldtrip Digest, Vol 10, Issue 15

Anna Lambrechts anna.lambrechts at gmail.com
Tue Sep 13 11:11:49 CEST 2011


Dear David,

I have had the same problem after end of August fieldtrip update. I had the
right toolbox, but matlab couldn't find the path to it. I just added the
exact path for randperm in setpath, which solved the problem.

Best,
Anna.


2011/9/13 <fieldtrip-request at donders.ru.nl>

> Send fieldtrip mailing list submissions to
>        fieldtrip at donders.ru.nl
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> or, via email, send a message with subject or body 'help' to
>        fieldtrip-request at donders.ru.nl
>
> You can reach the person managing the list at
>        fieldtrip-owner at donders.ru.nl
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of fieldtrip digest..."
>
>
> Today's Topics:
>
>   1. bufferviewer C++ code (JustinChen)
>   2. ft_freqstatistics issue (??? Undefined function or method
>      'randperm' for input arguments of type 'double'.) (Davide Rivolta)
>   3. Re: ft_freqstatistics issue (??? Undefined function or method
>      'randperm' for input arguments of type 'double'.)
>      (Roemer van der Meij)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 12 Sep 2011 18:07:36 -0400
> From: JustinChen <justin.sickkids at hotmail.com>
> To: <fieldtrip at donders.ru.nl>
> Subject: [FieldTrip] bufferviewer C++ code
> Message-ID: <BAY152-W1973669968BE6CA059B9EFF9020 at phx.gbl>
> Content-Type: text/plain; charset="gb2312"
>
>
>
>
>
> Hey, all, Recently I want to try to compile the bufferviewer C++ source
> code under the directory:  fieldtrip/realtime/utilities/viewer/. I tried to
> use the Microsoft Visual C++ IDE to compile the code but it failed, and now
> I am using the Eclipse+MinGW under the windows environment to compile it.
> Does anyone know what environment the C++ codes were compiled and debugged
> originally? And also I notice the code uses the FLTK API pakage to draw the
> GUI part, any other API libraries required to compile the code? Anybody who
> is familiar with the code please reply and I really appreciate your help.
> Thanks and have a good day!                           Justin
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110912/040d9dcc/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 13 Sep 2011 09:38:49 +0200
> From: Davide Rivolta <drivolta81 at gmail.com>
> To: fieldtrip at donders.ru.nl
> Subject: [FieldTrip] ft_freqstatistics issue (??? Undefined function
>        or method 'randperm' for input arguments of type 'double'.)
> Message-ID:
>        <CAMkcSw7VcTOp6rHZhFCyWxWFTwZ6BJTbNH5wgbuhTDh6W9Mbkg at mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear fieldtrippers,
>
> I wish to calculate the stat difference between stimulus and baseline in a
> group of subjects. I use ft_freqgrandaverage to average across subjects and
> then ft_freqstatistics (cluster statistic) to compare the 2 conditions
> (baseline & stimuli).
>
> I get this error:    ??? Undefined function or method 'randperm' for input
> arguments of type 'double'.
>
> I tried even with the newest version (20110911) but the problem persists. I
> am not sure what I have to do.
>
> Any advice would be super. The script is below.
>
> Thanks a lot,
>
> Davide
>
>
>
> datainpath = '/data/home1/drivolta/Out4VG/DATA/';
> dataoutpath = '/data/home1/drivolta/Out4VG/DATA/';
>
> % Controls
> Controls = {
>    'ASS31_TFR_high.mat';
>    'CSA07_TFR_high.mat';
>    'BMR08_TFR_high.mat';
>    'NPD18_TFR_high.mat';
>    %'BSA08_TFR_high.mat';
>    %'ABE08_TFR_high.mat';
>    %'EES05_TFR_high.mat';
>    %'GPS10_TFR_high.mat';
>    %'SDA01_TFR_high.mat';
>    %'CSA17_TFR_high.mat';
>    %'KBZ16_TFR_high.mat';
>
> };
>
> %--------------------------------------------------------------------------
> NControls = length(Controls);
>
> %% CONCATENATE DATA
> for i = 1:length(Controls)
>    fullname = strcat(datainpath, Controls{i,1});
>    load(fullname);
>
>    % Activation time window
>    TFR2 = power_continue_high; %Rename to change (select time window)
>    idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5));
>    TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx);
>    TFR2.time = power_continue_high.time(idx);
>    Stimuli{i} = TFR2;
>
>    % Baseline time window
>    TFR3 = power_continue_high;
>    idx = find((TFR3.time >= -1) &(TFR3.time < 0));
>    TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx);
>    TFR3.time = TFR2.time;
>    Baseline{i} = TFR3;
>
>    clear power_continue_high
>    clear TFR2
>    clear TFR3
> end;
> save Controls2Statistics Stimuli Baseline;
>
>
>
> cfg = [];
> cfg.channel = {'MEG', '-MRO31', '-MRO21'};
> cfg.keepindividual = 'yes';
>
> BaselineAll = ft_freqgrandaverage(cfg, Baseline{:});
> StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:});
>
>
>
> load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure
> containing grad field
>
> cfg                = [];
> cfg.method         = 'triangulation';
> cfg.neighbourdist  = 5;
> cfg.grad           = TFR.grad;
> cfg.layout         = 'CTF275.lay';
> neighbour          = ft_neighbourselection(cfg, Baseline{1});
> cfg = [];
> cfg.grad             = TFR.grad;
> cfg.channel          = {'MEG', '-MRO31', '-MRO21'};
> cfg.neighbourdist    = 4;
> cfg.minnbchan        = 1;
> cfg.clusteralpha     = 0.05; % control admission to a cluster
> cfg.alpha            = 0.05; % control the false alarm rate of the
> permutation test
> cfg.latency          = [0.5 1.5]; % time interval over which the
> experimental conditions are compared (in sec)
> cfg.frequency        = [50 70];
> cfg.avgovertime      = 'no';
> cfg.avgoverfreq      = 'no';
> cfg.avgoverchan      = 'no';
> cfg.clusterstatistics = 'maxsum';
> cfg.statistic        = 'actvsblT';
> cfg.numrandomization = 1000;
> cfg.correctm         = 'cluster';
> cfg.method           = 'montecarlo';
> cfg.approach         = 'montecarlo';
> cfg.dimord           = 'chan_freq_time';
> cfg.dim              = 'chan_freq_time';
> cfg.neighbours       = neighbour;
> cfg.tail = 0;
> cfg.clustertail = 0;
>
> nSubjects = 2*length(Controls);
>
> a = [1:nSubjects];
> b = ones(1,length(Controls));
> c = 2*(ones(1,length(Controls)));
>
> cfg.design = [a; b c];
> cfg.uvar = 1; % "subject" is unit of observation
> cfg.ivar = 2; % row of the design matrix that contains the independent
> variable
>
> stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll);
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/2e2f657f/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 13 Sep 2011 11:00:13 +0200
> From: Roemer van der Meij <r.vandermeij at donders.ru.nl>
> To: Email discussion list for the FieldTrip project
>        <fieldtrip at donders.ru.nl>
> Subject: Re: [FieldTrip] ft_freqstatistics issue (??? Undefined
>        function or method 'randperm' for input arguments of type 'double'.)
> Message-ID: <4E6F1B9D.3050003 at donders.ru.nl>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
>
> Hi Davide,
>
> It sounds like you are missing the Statistics Toolbo
> <http://www.mathworks.nl/products/statistics/index.html>x for matlab. I
> remember some internal discussions in the team about writing an internal
> version of randperm.m with similar functions, but we haven't done so far
> if I recall correctly. Installing the toolbox, or checking whether you
> have it on your path should solve your problem.
>
> Hope it helps,
> Roemer
>
>
>
> On 13-09-11 9:38, Davide Rivolta wrote:
> > Dear fieldtrippers,
> > I wish to calculate the stat difference between stimulus and baseline
> > in a group of subjects. I use ft_freqgrandaverage to average across
> > subjects and then ft_freqstatistics (cluster statistic) to compare the
> > 2 conditions (baseline & stimuli).
> > I get this error:    ??? Undefined function or method 'randperm' for
> > input arguments of type 'double'.
> > I tried even with the newest version (20110911) but the problem
> > persists. I am not sure what I have to do.
> > Any advice would be super. The script is below.
> > Thanks a lot,
> > Davide
> > datainpath = '/data/home1/drivolta/Out4VG/DATA/';
> > dataoutpath = '/data/home1/drivolta/Out4VG/DATA/';
> >
> > % Controls
> > Controls = {
> >     'ASS31_TFR_high.mat';
> >     'CSA07_TFR_high.mat';
> >     'BMR08_TFR_high.mat';
> >     'NPD18_TFR_high.mat';
> >     %'BSA08_TFR_high.mat';
> >     %'ABE08_TFR_high.mat';
> >     %'EES05_TFR_high.mat';
> >     %'GPS10_TFR_high.mat';
> >     %'SDA01_TFR_high.mat';
> >     %'CSA17_TFR_high.mat';
> >     %'KBZ16_TFR_high.mat';
> >
> > };
> >
> %--------------------------------------------------------------------------
> > NControls = length(Controls);
> > %% CONCATENATE DATA
> > for i = 1:length(Controls)
> >     fullname = strcat(datainpath, Controls{i,1});
> >     load(fullname);
> >
> >     % Activation time window
> >     TFR2 = power_continue_high; %Rename to change (select time window)
> >     idx = find((TFR2.time >= 0.5) &(TFR2.time <= 1.5));
> >     TFR2.powspctrm = power_continue_high.powspctrm(:, :,idx);
> >     TFR2.time = power_continue_high.time(idx);
> >     Stimuli{i} = TFR2;
> >
> >     % Baseline time window
> >     TFR3 = power_continue_high;
> >     idx = find((TFR3.time >= -1) &(TFR3.time < 0));
> >     TFR3.powspctrm = power_continue_high.powspctrm(:,:, idx);
> >     TFR3.time = TFR2.time;
> >     Baseline{i} = TFR3;
> >
> >     clear power_continue_high
> >     clear TFR2
> >     clear TFR3
> > end;
> > save Controls2Statistics Stimuli Baseline;
> >
> > cfg = [];
> > cfg.channel = {'MEG', '-MRO31', '-MRO21'};
> > cfg.keepindividual = 'yes';
> > BaselineAll = ft_freqgrandaverage(cfg, Baseline{:});
> > StimuliAll = ft_freqgrandaverage(cfg, Stimuli{:});
> > load /data/home1/drivolta/Out4VG/DATA/GRAD % File with a structure
> > containing grad field
> > cfg                = [];
> > cfg.method         = 'triangulation';
> > cfg.neighbourdist  = 5;
> > cfg.grad           = TFR.grad;
> > cfg.layout         = 'CTF275.lay';
> > neighbour          = ft_neighbourselection(cfg, Baseline{1});
> > cfg = [];
> > cfg.grad             = TFR.grad;
> > cfg.channel          = {'MEG', '-MRO31', '-MRO21'};
> > cfg.neighbourdist    = 4;
> > cfg.minnbchan        = 1;
> > cfg.clusteralpha     = 0.05; % control admission to a cluster
> > cfg.alpha            = 0.05; % control the false alarm rate of the
> > permutation test
> > cfg.latency          = [0.5 1.5]; % time interval over which the
> > experimental conditions are compared (in sec)
> > cfg.frequency        = [50 70];
> > cfg.avgovertime      = 'no';
> > cfg.avgoverfreq      = 'no';
> > cfg.avgoverchan      = 'no';
> > cfg.clusterstatistics = 'maxsum';
> > cfg.statistic        = 'actvsblT';
> > cfg.numrandomization = 1000;
> > cfg.correctm         = 'cluster';
> > cfg.method           = 'montecarlo';
> > cfg.approach         = 'montecarlo';
> > cfg.dimord           = 'chan_freq_time';
> > cfg.dim              = 'chan_freq_time';
> > cfg.neighbours       = neighbour;
> > cfg.tail = 0;
> > cfg.clustertail = 0;
> > nSubjects = 2*length(Controls);
> > a = [1:nSubjects];
> > b = ones(1,length(Controls));
> > c = 2*(ones(1,length(Controls)));
> > cfg.design = [a; b c];
> > cfg.uvar = 1; % "subject" is unit of observation
> > cfg.ivar = 2; % row of the design matrix that contains the independent
> > variable
> > stat = ft_freqstatistics(cfg, BaselineAll, StimuliAll);
> >
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> --
> Roemer van der Meij M.Sc.
> PhD student
> Donders Institute for Brain, Cognition and Behaviour
> Centre for Cognition
> P.O. Box 9104
> 6500 HE Nijmegen
> The Netherlands
> Tel: +31(0)24 3655932
> E-mail: r.vandermeij at donders.ru.nl
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/b90d5fc8/attachment.html
> >
>
> ------------------------------
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> End of fieldtrip Digest, Vol 10, Issue 15
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110913/378910c7/attachment.html>


More information about the fieldtrip mailing list