function dose = open_dose(dose_file_name) fid = fopen(dose_file_name,'rb'); M = fread(fid,1,'int'); N = fread(fid,1,'int'); Q = fread(fid,1,'int'); Nind = fread(fid,1,'int'); dose = zeros(M,N,Q); ind = fread(fid,Nind,'int'); data = fread(fid,Nind,'double'); dose(ind) = data; fclose(fid);