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
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
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Cell Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!