Matlab Path Generation

back to Fan's Reusable Matlab Repository or Dynamic Asset Repository.

Contents

Generate Platform Agnostic Path

root = 'c:';
user = 'Users/fan/';
project = '/M4Econ/';
subfolder = 'support////string';
file_name = 'fs_string.m';
f = fullfile(root, user, project, subfolder, file_name);

disp(f);

root = 'c';
user = 'fan';
project = 'M4Econ';
subfolder = 'support/string';
file_name = 'fs_string.m';
f = fullfile(root, user, project, subfolder, file_name);

disp(f);
c:\Users\fan\M4Econ\support\string\fs_string.m
c\fan\M4Econ\support\string\fs_string.m