ctf_stim2dat

ctf_stim2dat - function

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
function makeDatFromCTF(filesearch,datfilename,typego,typebutton) % makeDatFromCTF % filesearch is a string that if used with dir, can identify all files % necssary to include. Make sure you're in the right directory. It should % lead to files with columns of continuous STIM channel output % typego lists the types of stim that one should expect button responses % to. % typebutton is the button response one should get. 0 if not buttonpress if (nargin < 3) typego = [6 7 8 9]; typebutton = [2 0 0 0]; end respvals = [33554432 65536 262144 327680 393216 458752 524288 589824]; resptype = [2 1 4 5 6 7 8 9]; maxtypeval = 589824; % above this should be button presses only. RESPLENGTH = 50; fs = 1200; buttonwait = fs*1.5; numHeaderLines = 19; files = dir(filesearch); allStim = []; for i = 1:length(files) fprintf('Getting Data from %s . .. \n',files(i).name); [time,stim] = textread(files(i).name,'%f %f','delimiter','\t','headerlines',2); allStim = [allStim;stim]; clear time stim; end fid = fopen(datfilename,'W');
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/07/2010 for the course ENG 42336 taught by Professor Thomasholland during the Spring '10 term at UC Davis.

Page1 / 2

ctf_stim2dat - function

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online