Cell array of arrays into matrix

Need help!! Need to use the information here to know make figures. Trying to simply get the information to show up in a matrix rather than a cell array of cell arrays I got it down to 4X7 cell array of {1,1}
Need to try to turn this into a matrix or some kind of format I can use Tried cell2mat and it didn't work because of the cell array of arrays Any help would be appreciated ???
cd('S:\matlab\homework6\Raw_Data\lot_no_247_Data')
id_247_2014 = fopen('2014_lot_no_247_Data.txt');
id_247_2015 = fopen('2015_lot_no_247_Data.txt');
id_247_2016 = fopen('2016_lot_no_247_Data.txt');
id_247_2017 = fopen('2017_lot_no_247_Data.txt');
data_247_2014 = textscan(id_247_2014, '%s %s %s %s %s %s %s '); % Reading data_247_2015 = textscan(id_247_2015, '%s %s %s %s %s %s %s '); % Reading data_247_2016 = textscan(id_247_2016, '%s %s %s %s %s %s %s '); % Reading data_247_2017 = textscan(id_247_2017, '%s %s %s %s %s %s %s '); % Reading
for i=1:7
Categories{i}=data_247_2014{i}{1};
end
%content from year loop
for i=1:7
Content247_2014{i}=data_247_2014{i}{2};
Content247_2015{i}=data_247_2015{i}{2};
Content247_2016{i}=data_247_2016{i}{2};
Content247_2017{i}=data_247_2017{i}{2};
end
lot_247=[Content247_2014;
Content247_2015;
Content247_2016;
Content247_2017];

2 件のコメント

Turlough Hughes
Turlough Hughes 2019 年 12 月 25 日
Can you attach the 4 files?
Ayala Tabak-Dar
Ayala Tabak-Dar 2019 年 12 月 25 日
Sent :) Thanks in advance

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

回答 (1 件)

Hiro Yoshino
Hiro Yoshino 2019 年 12 月 26 日

0 投票

Did you recieve an error message or get something you did not expect?
Check if
  • the matrix is rectangular
  • the matrix has the data in the same format
may work for you.

カテゴリ

ヘルプ センター および File ExchangeData Type Conversion についてさらに検索

製品

質問済み:

2019 年 12 月 25 日

回答済み:

2019 年 12 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by