Dear Haiteng,
Since there are no events in your dataset, it is not possible to
define trials based on events. The error you are reporting is a little
bit strange, but in any case you can epoch your file using a short
script, something like the following:
D = spm_eeg_load
trialduration = 1; % sec
trl = 1:round(D.fsample*trialduration):D.nsamples;
trl = trl(:);
trl = [trl(1:(end-1)) trl(2:end) - 1 ones(length(trl)-1, 1)];
% Epoching continuous M/EEG data
% FORMAT D = spm_eeg_epochs(S)
%
% S - input structure (optional)
% (optional) fields of S:
% S.D - MEEG object or filename of M/EEG mat-file with
% continuous data
%
% Either (to use a ready-made trial definition):
% S.epochinfo.trl - Nx2 or Nx3 matrix (N - number of trials)
% [start end offset]
% S.epochinfo.conditionlabels - one label or cell array of N labels
S = [];
S.D = D;
S.epochinfo.trl = trl;
S.epochinfo.conditionlabels = 'Whatever';
D = spm_eeg_epochs(S);
Best,
Vladimir
2009/7/6 hiten <[log in to unmask]>:
> Dear SPMers:
> Now ,I want to use spm8 to process resting state MEG data. The resting
> state is the state in which the subjects are informed to hold still ,keep
> their eyes closed and not think of anything in particular.So there is no
> trial designed.Our data collection last for 120sec. attachment is the detail
> information of the continuous data .when go to epoching step, the following
> error appears:
> ?? Reference to non-existent field 'offset'.
> Error in ==> spm_eeg_definetrial at 187
> trlbeg = event(sel(j)).sample - event(sel(j)).offset + trloff;
> Error in ==> spm_eeg_epochs at 101
> [epochinfo.trl, epochinfo.conditionlabels, S] =
> spm_eeg_definetrial(S_definetrial);
> ??? Error using ==> spm_eeg_epochs;
> Reference to non-existent field 'offset'.
> ??? Error while evaluating uicontrol Callback
> could anyone give some suggestion or fix the problem? Thanks in advance!
>
>
> --
> haiteng jiang
> Research Center for Learning Science,
> Southeast University
> Si Pai Lou 2 # , Nanjing, 210096, P.R.China
> Brain Imaging Lab
> Email: jianghaiteng@126com
>
>
> ________________________________
> 200万种商品,最低价格,疯狂诱惑你
|