[FieldTrip] Opening preprocessed .mat files for further analysis
Arti Abhishek
mailtome.2113 at gmail.com
Wed Oct 15 03:39:36 CEST 2014
Apologies for the previous email. I hit send before finished typing
I am stumbled upon a very basic problem ( I am a beginner MATLAB user). I
have EEG data preprocessed and saved as .mat files. Now I want to further
process the data. I used the following script
Subjects= {'s01', 's02', 's03', 's04', 's05', 's06', 's07', 's08', 's09',
's10', 's11', 's12'...
's13', 's14', 's15', 's16', 's17', 's18', 's19', 's21', 's23'};
Triggers = [101 111 121];
Conditions = {'4Ch', '8Ch', '16Ch'};
for i=1:length(Subjects)
for j=1:length (Conditions)
cfg =[];
FileName = strcat(Subjects{i},'_', Conditions{j}, '.mat');
DataFIC = load (FileName);
hdr = ft_read_header (DataFIC);
dat = ft_read_data(DataFIC, 'header', 'hdr');
cfg.method = 'summary';
cfg.channels = 'all';
data_clean = ft_rejectvisual(cfg, dat);
save (strcat(Subjects{i},'_', Conditions{j}) , 'data_clean')
end;
end;
This is returning the following error
Undefined function 'eq' for input arguments of type 'struct'.
Error in filetype_check_uri (line 62)
sep = find(filename==':');
Error in fetch_url (line 33)
if filetype_check_uri(filename, 'sftp')
Error in ft_read_header (line 105)
filename = fetch_url(filename);
Any help would be much appreciated.
Regards,
Arti
On Wed, Oct 15, 2014 at 12:36 PM, Arti Abhishek <mailtome.2113 at gmail.com>
wrote:
> Dear list,
>
> I am stumbled upon a very basic problem ( I am a beginner MATLAB user). I
> have EEG data preprocessed and saved as .mat files. Now I want to further
> process the data. I used the following script
>
> Subjects= {'s01', 's02', 's03', 's04', 's05', 's06', 's07', 's08', 's09',
> 's10', 's11', 's12'...
>
> 's13', 's14', 's15', 's16', 's17', 's18', 's19', 's21', 's23'};
>
> Triggers = [101 111 121];
>
> Conditions = {'4Ch', '8Ch', '16Ch'};
>
> for i=1:length(Subjects)
>
> for j=1:length (Conditions)
>
>
>
> cfg =[];
>
>
> FileName = strcat(Subjects{i},'_', Conditions{j}, '.mat');
>
>
>
> DataFIC = load (FileName);
>
> hdr = ft_read_header (DataFIC);
>
>
> dat = ft_read_data(DataFIC, 'header', 'hdr');
>
> cfg.method = 'summary';
>
> cfg.channels = 'all';
>
>
>
> data_clean = ft_rejectvisual(cfg, dat);
>
>
> save (strcat(Subjects{i},'_', Conditions{j}) , 'data_clean')
>
> end;
>
> end;
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141015/0687dea2/attachment.html>
More information about the fieldtrip
mailing list