spm_authors.m 840 B

1234567891011121314151617181920212223242526
  1. function [current, previous] = spm_authors
  2. % Return list of SPM coauthors
  3. % FORMAT [current, previous] = spm_authors
  4. % current - cell array of SPM coauthors of the current release
  5. % previous - cell array of SPM coauthors of previous releases
  6. %__________________________________________________________________________
  7. % Copyright (C) 2010-2012 Wellcome Trust Centre for Neuroimaging
  8. % SPM
  9. % $Id: spm_authors.m 5039 2012-11-06 20:39:58Z guillaume $
  10. fid = fopen(fullfile(spm('Dir'),'AUTHORS.txt'),'rt');
  11. if fid==-1, current = {}; previous = {}; return; end
  12. l = {};
  13. while 1
  14. tline = fgetl(fid);
  15. if ~ischar(tline), break, end
  16. if ~isempty(tline), l{end+1} = strtrim(tline(2:end)); end
  17. end
  18. fclose(fid);
  19. e = find(cellfun(@isempty,l));
  20. if numel(e)~=2, l = {}; e = [0 0]; end
  21. current = l(e(1)+1:e(2)-1)';
  22. previous = l(e(2)+1:end)';