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 件のコメント

Kuifeng
Kuifeng 2016 年 4 月 16 日
%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

サインインしてコメントする。

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 16 日

0 投票

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCell Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by