Excluding outlying data in cell array
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!