Excluding outlying data in cell array

1 回表示 (過去 30 日間)
Aske Dyrdal
Aske Dyrdal 2019 年 3 月 13 日
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 Center および File ExchangeWorkspace 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