📄 loadallfiles.m
字号:
function [status,datafiles] = loadallfiles(cwd, filter)% tstool/loadallfiles%% % load all filenames with extensions matching filter in current directory cwd% the names are inserted into the tstool file listif ((cwd(end) == '/') | (cwd(end) == '\')) & (length(cwd) > 1) cwd = cwd(end-1);enddatafiles={};status=0;found = 0;d = dir(cwd);cwd = fileparts(cwd);for i=1:length(d) filename = d(i).name; [path,name,ext,ver] = fileparts(filename); if strcmp(cwd, '.') fullname = filename; % keine laestigen Punkte vor Files im lokalen Verzeichnis else fullname = fullfile(cwd,[name ext]); end if strcmp(filter, ext) | isempty(filter) if exist(fullname, 'file') disp(['Load ' fullname]); [status,datafiles]=writelevel(fullname,datafiles); if status == 0 found = found + 1; end end endendif found == 0 status = 'no matching files found';else status = 0; % OKend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -