Excluding outlying data in cell array
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Workspace Variables and MAT Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!