www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CreateAFullFileNameExample.m

    %% Create a Full File Path on Windows
% |fullfile| returns a character vector containing the full path to the
% file. On Windows(R) platforms, the file seperator character is a
% backslash (|\|).
f = fullfile('myfolder','mysubfolder','myfile.m')