关于Matlab中fullfile函数的疑问

问问题描述

关于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

赞 (0)

发表回复

本站作者后才能评论

评论列表(4条)

  • 河源
    河源 2026年09月30日

    我是公众科技网的签约作者“河源”!

  • 河源
    河源 2026年09月30日

    希望本篇文章《关于Matlab中fullfile函数的疑问》能对你有所帮助!

  • 河源
    河源 2026年09月30日

    本站[公众科技网]内容主要涵盖:教育咨询,知识百科

  • 河源
    河源 2026年09月30日

    本文概览:是因为,在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

联系我们

联系:143 0457 151

工作时间:周一至周五,9:30-18:30,节假日休息

关注我们