问问题描述
关于Matlab中fullfile函数的疑问,在线求解答
答精选答案

是因为,在fullfile的代码最后有:
if bIsPC f = strrep(f,'/','
');end
其中bIsPC为调用ispc函数的结果(ispc又进一步调用computer函数),用于确定操作系统是否为Windows。
不建议直接修改fullfile.m文件,可以在调用fullfile之后再用strrep换回来:
>> f=fullfile('略','brown_bm_1/brown_bm_1/','intrinsics.txt')f =略
brown_bm_1
brown_bm_1
intrinsics.txt>> f = strrep(f,'
','/')f =略/brown_bm_1/brown_bm_1/intrinsics.txt
本文来自作者[河源]投稿,不代表公众科技网立场,如若转载,请注明出处:https://www.cpst.net.cn/changshijingxuan/202609/1084424.html
评论列表(4条)
我是公众科技网的签约作者“河源”!
希望本篇文章《关于Matlab中fullfile函数的疑问》能对你有所帮助!
本站[公众科技网]内容主要涵盖:教育咨询,知识百科
本文概览:是因为,在fullfile的代码最后有:if bIsPC f = strrep(f,'/','');end其中bIsPC为调用ispc函数的结果(ispc又进一步调用computer函数),用于确定操作系统是否为Windows。不建议直接修改fullfile.m文件,可以在调用fullfile之后再用strrep换回来:>> f=fullfile('略','brown_bm_1/brown_bm_1/','intrinsics.txt')f =略brown_bm_1brown_bm_1intr