[FieldTrip] correct use of ft_read_data
Raquel Bibi
bibi.raquel at gmail.com
Sun Oct 7 19:31:48 CEST 2012
Have you tried to use ft_read_event? Take a look at trialfun_general it will help you understand how to read in your events.
Best,
Raquel
Sent from my iPhone
On Oct 6, 2012, at 11:37 AM, Steph <veganathlete at ymail.com> wrote:
> Dear Fieldtrippers,
>
> could you help me make ft_read_data work?
>
> the data is a <34x48128 double>.
>
> the header looks like this:
>
> h =
> nChans: 34
> nSamples: 48128
> nSamplesPre: 0
> nTrials: 1
> Fs: 512
> label: {34x1 cell}
> orig: [1x1 struct]
> chantype: {34x1 cell}
> chanunit: {34x1 cell}
>
> I want to read one channel to define the trials in my trialfunction.
>
> t=ft_read_data(cfg.dataset,'header',h,'chanindx',17)
>
> Attempted to access dat(17,:); index out of bounds
> because size(dat)=[1,48128].
>
> Error in ft_read_data (line 294)
> dat(i,:) = dat(i,:).*
> parameters.SourceChGain.NumericValue(i) +
> parameters.SourceChOffset.NumericValue(i);
>
> Best
> Steph
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
More information about the fieldtrip
mailing list