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

%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 Exchange에서 Cell Arrays에 대해 자세히 알아보기

질문:

2016년 4월 16일

댓글:

2016년 4월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by