function his = read_HIS_records(file,beginning_index,ending_index) % % function his = read_HIS_records(file,beginning_index,ending_index) % % ....This Matlab function using 'read_HIS_record.m' to read a sequence % of HIS records. % % Input: % file - filename of HIS data file % beginning_index - Beginning HIS record index % ending_index - Ending HIS record index % % Output: % his - array of structures containing HIS data % % CAUTION: One cannot perform the same type of % Matlab manipulations on an array of % structures as on a simple array. For % instance, mean(his.rad) will NOT % return the mean radiance as a function % of wavenumber. Here is a piece of % code that will average HIS radiances % in an array of structures: % % his = read_HIS_records('data.ume',1,10); % radiance = []; % for k = 1:length(his), % radiance = [radiance; his(k).rad]; % end % mrad = mean(radiance); % clear radiance % % Written by Von P. Walden % 18 May 1998 % 28 May 1998 (Added comment on how to handle % data within an array of structures.) % his = read_HIS_record(file,beginning_index); l = 2; for k = beginning_index+1:ending_index his(l) = read_HIS_record(file,k); l = l + 1; end