help > RE: Import condition text file format
Dec 21, 2020  10:12 PM | aj2337 - UCSD
RE: Import condition text file format
Hi Alfredo: 
When trying to use the conn_importcondition('.csv') command, I keep getting the following error in Matlab:

-----
Error using dataread
Trouble reading integer from file (row 1, field 2) ==>

Error in textread (line 171)
[varargout{1:nlhs}]=dataread('file',varargin{:}); %#ok

Error in conn_importcondition (line 102)
[conditions,nsubs,nsess,onsets,durations]=textread(filename, '%s%d%d%s%s','delimiter',',','headerlines',1);
-----

A few months ago when setting up a different study I was able to use it without problems, and I'm wondering if something changed / how to get around this. My conditions csv file is formatted according to guidelines (header line, 5 columns, 0 and inf for full session, blank for all subjects). Apparently it's not liking the blanks, but when I remove them and try again it fails with a different row that contains text instead of an integer (e.g. header). 

Your help and tool are much appreciated! 
Thanks,
Alex

Threaded View

TitleAuthorDate
Xiaozhen You Feb 1, 2017
Alfonso Nieto-Castanon Feb 7, 2017
RE: Import condition text file format
aj2337 Dec 21, 2020
Alfonso Nieto-Castanon Dec 21, 2020
aj2337 Dec 22, 2020
Alfonso Nieto-Castanon Jan 9, 2021
syoun Jun 4, 2021
Samantha Audrain Oct 4, 2021
Alfonso Nieto-Castanon Oct 4, 2021