<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Thanx, Arjen!<br>
Shame on me, I should have known that there would be a wikipage on
that :)<br>
<br>
And for the sake of archiving, in case someone else ever bumps
into this thread because they're making the same mistake as me
when using this function, here's what I was doing wrong:<br>
The input Nchan x N_trials for each condition, Nchan should be 1
'cause my data are the RTs<br>
So:<br>
<br>
% input1 = RT_trials_cond1' ;
% size = 1 x 95<br>
% input2 = RT_trials_cond2' ; % size = 1 x 100<br>
cfgst = []; <br>
cfgst.method = 'histogram';<br>
output = ft_stratify(cfgst, input1, input2);
<br>
<br>
Now it will run and it won't even complain they are of different
sizes either!<br>
<br>
Hope this will help anyone in the future making the same mistake!<br>
Cheers, Vitória<br>
<br>
<br>
<br>
On 6/2/2013 12:00 PM, <a class="moz-txt-link-abbreviated" href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a> wrote:<br>
</div>
<blockquote
cite="mid:mailman.11.1370167205.25821.fieldtrip@science.ru.nl"
type="cite">
<pre wrap="">Message: 2
Date: Sun, 02 Jun 2013 11:17:25 +0200
From: Vit?ria Magalh?es Piai <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:vitoria.piai@gmail.com"><vitoria.piai@gmail.com></a>
To: <a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a>
Subject: [FieldTrip] how to use ft_stratify?
Message-ID: <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:51AB0DA5.10805@gmail.com"><51AB0DA5.10805@gmail.com></a>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi all,
I'm trying to use ft_stratify for the first time, but (it could be just
me) I don't find the help info helpful enough <span class="moz-smiley-s1" title=":)"><span>:)</span></span>
What I want to achieve in the end is TFRs of two conditions for which
the histogram of the reaction time over trials for each condition is
matched.
If I understood ft_stratify correctly (and I doubt that), I could use
this function to select the trials for each condition such that the
histograms of the RTs match. Then knowing which trials to keep, I run
ft_freqanalysis on those specifically.
So question number 1, is that how I should proceed? 'Cause as far as I
can tell, ft_stratify will not take a whole raw data structure: The help
says "each input is a Nchan X Nobs matrix". So I have to go for the RTs
then.
Assuming my approach is correct (ft_stratify on RTs of two conditions,
then move on with only those trials), I've made a matrix Nchan x
N_trials for each condition.
% input1 = 265 sensors x 95 RT_trials;
% input2 = 265 sensors x 100 RT_trials;
cfgst = [];
cfgst.method = 'histogram';
cfgst.equalbinavg = 'no';
cfgst.numbin = 4;
cfgst.numiter = 2000; % default
[output,bin] = ft_stratify(cfgst, input1, input2);
I then get an error in line 127:
linearhisto = zeros(ncond, cfg.numbin.^nchan);
??? Error using ==> zeros
Maximum variable size allowed by the program is exceeded.
Apparently, zeros(2, 4<sup class="moz-txt-sup"><span style="display:inline-block;width:0;height:0;overflow:hidden">^</span>265</sup>) is something matlab doesn't want to calculate!
Am I doing something wrong here? Has anyone worked with this function
before (with such a number of sensors)?
Any help is greatly appreciated!
Cheers, Vit?ria
------------------------------
Message: 3
Date: Sun, 2 Jun 2013 11:46:03 +0200 (CEST)
From: "Stolk, A." <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:a.stolk@fcdonders.ru.nl"><a.stolk@fcdonders.ru.nl></a>
To: FieldTrip discussion list <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:fieldtrip@science.ru.nl"><fieldtrip@science.ru.nl></a>
Subject: Re: [FieldTrip] how to use ft_stratify?
Message-ID:
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:1910615072.1312606.1370166363974.JavaMail.root@sculptor.zimbra.ru.nl"><1910615072.1312606.1370166363974.JavaMail.root@sculptor.zimbra.ru.nl></a>
Content-Type: text/plain; charset=utf-8
Hi Vitoria,
There is a wikipage that may help you get started, and answer your questions:
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://fieldtrip.fcdonders.nl/example/stratify">http://fieldtrip.fcdonders.nl/example/stratify</a>
Best wishes,
Arjen </pre>
</blockquote>
<br>
</body>
</html>