Home > vbmeg > external > mne > mne_fread3.m

mne_fread3

PURPOSE ^

SYNOPSIS ^

function [retval] = mne_fread3(fid)

DESCRIPTION ^

 [retval] = mne_fread3(fid)
 read a 3 byte integer out of a file

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [retval] = mne_fread3(fid)
0002 %
0003 % [retval] = mne_fread3(fid)
0004 % read a 3 byte integer out of a file
0005 %
0006 
0007 %
0008 %   Author : Matti Hamalainen, MGH Martinos Center
0009 %   License : BSD 3-clause
0010 %
0011 % Revision 1.3  2006/04/23 15:29:40  msh
0012 % Added MGH to the copyright
0013 %
0014 % Revision 1.2  2006/04/10 23:26:54  msh
0015 % Added fiff reading routines
0016 %
0017 % Revision 1.1  2005/11/21 02:15:51  msh
0018 % Added more routines
0019 %
0020 %
0021 
0022 b1 = fread(fid, 1, 'uchar') ;
0023 b2 = fread(fid, 1, 'uchar') ;
0024 b3 = fread(fid, 1, 'uchar') ;
0025 retval = bitshift(b1, 16) + bitshift(b2,8) + b3 ;
0026

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005