Excluding outlying data in cell array
1 次查看(过去 30 天)
显示 更早的评论
Hey,
I am no expert in Matlab and I am having troubles with some code designed to extract data from a txt. file and allocate it into a cell array. My problem is that the data comes in different matrix sizes, so I wish to exclude the data matrixs based on a certain threshold.
But how is that done and where can I incorporate it in my code shown below?
At the moment I have to manually delete the txt. files which has "extreme" dimensions.
Code used to extract the data from
%% load data AZURA
files = dir( fullfile(dirName,'*.txt') ); %# list all *.txt files
[~,index] = sortrows([files.datenum].'); files = files(index); clear index
% Read data file
files = {files.name}'; %# file names0
data = cell(numel(files),1); %# store file contents
for i=1:numel(files)
fname = fullfile(dirName,files{i}); %# full path to file
data{i} = dlmread(fname); %# load file
end
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Workspace Variables and MAT Files 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!