Matlab实用函数
1 : filesep
Directory separator for this platform.
F = filesep returns the file separator character for this platform.
The file separator is the character that separates
directory names in filenames.
Example(windows):
filesep
ans =
\
fullfile(D1,D2, ... ,FILE) builds a full file name from the directories D1,D2, etc and filename FILE specified. This is conceptually equivalent to
F = [D1 filesep D2 filesep ... filesep FILE]
except that care is taken to handle the cases where the directory
parts D1, D2, etc. may begin or end in a filesep. Specify FILE = ''
to build a pathname from parts.
Example(windows):
fullfile(matlabroot,'toolbox','matlab','general','Contents.m')
ans =
C:\Program Files\MATLAB\R2011b\toolbox\matlab\general\Contents.m