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

 採用された回答

0 投票

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeAdding custom doc についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!