Last active
January 24, 2019 13:59
-
-
Save hibetterheyj/f0ab3f5ce6bbeba315b555eeeba40a71 to your computer and use it in GitHub Desktop.
replace dir path with uniform style (matlab)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% process path to make sure it's uniform | |
% ispc() 用于判定在win系统下运行,把他改成标准化的'/' | |
% streep()可以用于替换单个str元素或者cell array中的str | |
if ispc(), base_path = strrep(base_path, '\', '/'); end | |
% 在行末补上一个/ | |
if base_path(end) ~= '/', base_path(end+1) = '/'; end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment