open_dose.m 289 B

123456789101112
  1. function dose = open_dose(dose_file_name)
  2. fid = fopen(dose_file_name,'rb');
  3. M = fread(fid,1,'int');
  4. N = fread(fid,1,'int');
  5. Q = fread(fid,1,'int');
  6. Nind = fread(fid,1,'int');
  7. dose = zeros(M,N,Q);
  8. ind = fread(fid,Nind,'int');
  9. data = fread(fid,Nind,'double');
  10. dose(ind) = data;
  11. fclose(fid);