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 =
\
2:  fullfile
    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
posted @ 2014-09-28 23:45  DeepVL  阅读(204)  评论(0编辑  收藏  举报