mttWriteSystemApps.m 655 B

123456789101112131415161718192021222324
  1. function mttWriteSystemApps(model)
  2. if ~isfield(model,'app')
  3. return ;
  4. end
  5. filename = [model.source,'_include_apps.h'] ;
  6. fid = fopen(filename,'w') ;
  7. mttNotify(['...creating ',filename]) ;
  8. mttWriteNewLine ;
  9. fprintf(fid,['// Applications for Ordinary Differential Equations\n']) ;
  10. fprintf(fid,'\n') ;
  11. fprintf(fid,['// file: ',filename,'\n']) ;
  12. fprintf(fid,['// written by MTT on ',datestr(now),'\n']) ;
  13. fprintf(fid,'\n\n') ;
  14. for i = 1:length(model.app)
  15. app_inclusion = ['#include "',model.app{i},'"\n'] ;
  16. fprintf(fid,app_inclusion) ;
  17. end
  18. fclose(fid) ;