% returns one of multi channel frames in separate channels

function a0 = myname(l)

M=240;
N=320;
MN=M*N;

myfidinteger = fopen('sitting4_swarp/data');

fseek(myfidinteger,l*MN*3,-1); % position l frames from beginning of file
[a0, count]=fread(myfidinteger,M*N,'uchar');
if count~=MN
  error(sprintf('getframe: only read %d of %d elements, first channel %d',count,MN))
end%if

fclose(myfidinteger);

a0=reshape(a0,N,M);

a0=a0.';

disp(sprintf('loadframe.m: cropping frame %d to 230 by 310',l))
a0=a0(2:M-8,3:N-7);

