00001 00002 function chx = fetchbs(path, c1, c2, len) 00003 fd = fopen(path, "r"); 00004 chx = zeros(len, c2-c1); 00005 i = 0;while (i++ < c1-1) 00006 fread(fd, len, "short"); # discard 00007 endwhile 00008 for i = c1:c2 00009 ch = fread(fd, len, "short"); 00010 chx(:, i) = ch; 00011 endfor 00012 fclose(fd); 00013 endfunction