write_presc.asv 659 B

1234567891011121314151617181920212223
  1. function presc = write_presc(varargin)
  2. mkdir(struct2str);
  3. cd varargin;
  4. fid = fopen('TumorDosePlus.bin','wb');
  5. fwrite(fid,varargin.x_count,'int');
  6. fwrite(fid,varargin.y_count,'int');
  7. fwrite(fid,varargin.z_count,'int');
  8. fwrite(fid,varargin.Nind,'int32');
  9. fwrite(fid,varargin.non_zero_indices,'int32');
  10. fwrite(fid,varargin.non_zero_values,'single');
  11. fclose(fid);
  12. fid = fopen('TumorDoseMinus.bin','wb');
  13. fwrite(fid,varargin.x_count,'int');
  14. fwrite(fid,varargin.y_count,'int');
  15. fwrite(fid,varargin.z_count,'int');
  16. fwrite(fid,varargin.Nind,'int32');
  17. fwrite(fid,varargin.non_zero_indices,'int32');
  18. fwrite(fid,varargin.non_zero_values,'single');
  19. fclose(fid);
  20. cd ..;