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 Kommentar

%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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 16 Apr. 2016

0 Stimmen

You can use cell arrays,
A=[1 2 3]
B{1}=A
A=[4 5 6 7]
B{2}=A

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

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

Start Hunting!

Translated by