% create array that is able to hold the information vtc_sizes = zeros(size(mdm.XTC_RTC, 1), 7); % loop over the VTC files for vtc_count = 1:size(vtc_sizes, 1) % read header h = xff(mdm.XTC_RTC{vtc_count, 1}, 'h'); % copy header fields vtc_sizes(vtc_count, :) = ... [h.XStart, h.YStart, h.ZStart, h.XEnd, h.YEnd, h.ZEnd, h.Resolution]; end % any size mismatch? if any(any(diff(vtc_sizes))) % find out which one, taking the first as the norm for vtc_count = 2:size(vtc_sizes, 1) if any(vtc_sizes(vtc_count, :) ~= vtc_sizes(1, :)) disp(sprintf('VTC file %s mismatches first file!', ... mdm.XTC_RTC{vtc_count, 1})); end end end