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 个)

类别

Help CenterFile 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!

Translated by