0001 function fiff_write_raw_buffer(fid,buf,cals)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 me='MNE:fiff_write_raw_buffer';
0020 if nargin ~= 3
0021 error(me,'Incorrect number of arguments');
0022 end
0023
0024 if size(buf,1) ~= length(cals)
0025 error(me,'buffer and calibration sizes do not match');
0026 end
0027
0028 global FIFF;
0029 if isempty(FIFF)
0030 FIFF = fiff_define_constants();
0031 end
0032
0033 fiff_write_float(fid,FIFF.FIFF_DATA_BUFFER,inv(diag(cals))*buf);
0034
0035 return;