Hi everyone!
I have an excel file with 44 sheets, each with a 56x16 matrix. Does anyone know how I can import the first column of each sheet as an 2464 (=44*56) element column vector? And how to repeat this for each column, so I'd end up with 16 column vectors?
The range of the first column is B2:B57, second column is C2:C57 etc., and the sheetnames are country codes.
Thank you in advance!!

 採用された回答

darova
darova 2020 年 5 月 17 日

1 投票

Use for loop
B = [];
for i = 1:50
A = readmatrix('data.xlsx',i);
B = [B A(:,1)];
end

2 件のコメント

Ulrike Zijlstra
Ulrike Zijlstra 2020 年 5 月 17 日
Thanks!!
darova
darova 2020 年 5 月 17 日

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

その他の回答 (0 件)

カテゴリ

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

質問済み:

2020 年 5 月 17 日

コメント済み:

2020 年 5 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by