Changeset 784 for trunk/src/get_file_type.m
- Timestamp:
- Jun 7, 2014, 6:17:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_file_type.m
r783 r784 1 %'get_file_type': determine info about a file (image, multimage, civdata,...) .1 %'get_file_type': OBSOLETE, replaced by get_file_info 2 2 %------------------------------------------------------------------------ 3 3 % [FileType,FileInfo,Object]=get_file_type(fileinput) 4 4 % 5 5 % OUTPUT: 6 % FileType: type of file7 6 % FileInfo: structure containing info on the file (case of images or video), in particular 7 % .FileType: type of file, needed as input of read_field.m 8 8 % .Height: image height in pixels 9 9 % .Width: image width in pixels … … 16 16 % INPUT: 17 17 % fileinput: name, including path, of the file to analyse 18 function [File Info,VideoObject]=get_file_type(fileinput)18 function [FileType,FileInfo,VideoObject]=get_file_type(fileinput) 19 19 VideoObject=[]; 20 20 if exist(fileinput,'file') … … 23 23 else 24 24 FileInfo.FileType=''; 25 FileType=FileInfo.FileType; 25 26 return 26 27 end … … 30 31 case '.fig' 31 32 FileInfo.FileType='figure'; 32 case '.xml' 33 FileInfo.FileType='xml'; 34 case '.xls' 35 FileInfo.FileType='xls'; 36 case '.dat' 37 FileInfo.FileType='dat';; 33 case {'.xml','.xls','.dat','.bin'} 34 FileInfo.FileType=regexprep(FileExt,'^.','');% eliminate the dot of the extension; 38 35 otherwise 39 36 if ~isempty(FileExt)% exclude empty extension … … 109 106 end 110 107 end 108 FileType=FileInfo.FileType;
Note: See TracChangeset
for help on using the changeset viewer.