Home > asr > labRead0.m

labRead0

PURPOSE ^

labRead: Read a lab file

SYNOPSIS ^

function segment=labRead(labFile)

DESCRIPTION ^

 labRead: Read a lab file

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function segment=labRead(labFile)
0002 % labRead: Read a lab file
0003 
0004 %    Roger Jang, 20061122
0005 
0006 if nargin<1, selfdemo; return; end
0007 
0008 %[start, stop, label] = textread(labFile, '%d%d%s');    % This causes overflow!
0009 [start, stop, label] = textread(labFile, '%f%f%s');
0010 segmentNum=length(start);
0011 for i=1:segmentNum
0012     segment(i).start=start(i);
0013     segment(i).stop=stop(i);
0014     segment(i).label=label{i};
0015 end
0016 
0017 % ====== Self demo
0018 function selfdemo
0019 labFile='test.lab';
0020 segment=labRead(labFile)

Generated on Tue 01-Jun-2010 09:50:19 by m2html © 2003