Code library

Signed-off-by: 刘明宏 <liuminghong@mail.sdu.edu.cn>
这个提交包含在:
刘明宏
2023-06-22 06:27:19 +00:00
提交者 Gitee
父节点 186f84784d
当前提交 90b2d9ba09
共有 13 个文件被更改,包括 898 次插入0 次删除

17
lib/get_curveTxtFile.m 普通文件
查看文件

@@ -0,0 +1,17 @@
%Gets the path of a file with a specific character in the folder
function filenames = get_curveTxtFile(data_dir,id,str)
% data_dirfolder path
% idThe position of the character
% Finding characters
% example: curve_01.txt;curve_02.txt
% CurveFiles = get_curveTxtFile(data_dir,[1:5],'curve');
D = dir(data_dir );
nf = 0;
for i=3:numel(D)
if strcmp(D(i).name(id),str)
nf = nf+1;
filenames{nf,1} = [data_dir '\' D(i).name] ;
end
end