大伙儿们好,请问假如我不知道某个文件的后缀名,但是我要写个函数来获取这个文件的后缀名,请问怎么做?

 채택된 답변

0 개 추천

s=dir('C:\Windows'); %C:\Windows 你文件的绝对路径
[~,a,b]=fileparts(s(4).name) %红色的4,看看你的文件是哪个

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Adding custom doc에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!