Matlab 使用前缀读取/显示文件内容
有没有办法读取和打印我不知道全名的文件的内容 例如:Matlab 使用前缀读取/显示文件内容,matlab,Matlab,有没有办法读取和打印我不知道全名的文件的内容 例如: 如何读取/打印文件内容?使用dir获取所有可能的文件名,然后打印每个文件 fls = dir( fullfile(systemPath,'aeroD_*.txt') ); for fi=1:numel( fls ) myFile = fullfile( systemPath, fls(fi).name ); % now name has no wildchars % ... read the file end fls =
如何读取/打印文件内容?使用
dir
获取所有可能的文件名,然后打印每个文件
fls = dir( fullfile(systemPath,'aeroD_*.txt') );
for fi=1:numel( fls )
myFile = fullfile( systemPath, fls(fi).name ); % now name has no wildchars
% ... read the file
end
fls = dir( fullfile(systemPath,'aeroD_*.txt') );
for fi=1:numel( fls )
myFile = fullfile( systemPath, fls(fi).name ); % now name has no wildchars
% ... read the file
end