Create 'double' array with varying element sizes

I'm trying to process data contained in 16 different csv files(the extension is .dat though). I've imported the data as a 'double' type matrix for each file. I've done the following for the first 2 sets of data
[~,temp] = dos('dir /s /b *.dat');
csvnames = strsplit(temp,'\n')';
A0 = importdata(char(csvnames(1)));
exprmntdata = A0.data(); % 1250x4
A0 = importdata(char(csvnames(2)));
exprmntdata2 = A0.data(); 1470x4
Is their a way I can import into one array even though the sizes of each differ? Then I can call it by exprmntdata(1),exprmntdata(2),exprmntdata(3) etc. instead of exprmntdata1, exprmntdata2, exprmntdata3 etc.

1 commentaire

%walk around 1, consider use structure, e.g.
exprrmntdata.run1 = ... %make some changes can call it ..(1)
%walk around 2, use a for loop to set the names of strings such
%as exprmntdata1, exprmntdata2, exprmntdata3

Connectez-vous pour commenter.

 Réponse acceptée

Plus de réponses (0)

Catégories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by