1.原文 matlab分割字符串提取文件名
caseFileName = 'E:\test\test.txt';
[pathstr,name,suffix]=fileparts(caseFileName);
% pathstr 结果为 E:\test ;name 结果为test; suffix 结果为.txt
2.MATLAB提取文件名中的信息
原文 matlab如何提取特定字符串之间的数字 【实测成功】
clc;clear;
caseFileName = 'E:\test\test_w[1234]_h[5678].jpg';
% 提取数字1234
[pathstr,name,suffix]=fileparts(caseFileName);
w=extractBetween(name,'w[',']');
wsmat=cell2mat(w(1));
width = str2double(wsmat);
3.matlab读取excel文件内容
原文 五种matlab读取excel文件方法
table=readcell('temp.xlsx');
4.原文 matlab中cell矩阵特定字符串检索
5.Matlab固定路径下使用文件框选择文件
原文 Matlab使用文件框选择文件
clc;clear;
[name,pathName] = uigetfile('E:\test\*.*','Please select an image');%文件筐,选择文件
fileName = strcat(pathName,name);