フィルターのクリア

Importing Excel multiple sheet with individual multiple columns

3 ビュー (過去 30 日間)
Houn JH
Houn JH 2019 年 4 月 25 日
回答済み: Bob Thompson 2019 年 4 月 25 日
Hi, first of all, thank you for reading this. I am trying to import a excel data (Attached file: Data_1.xlsl) with mutiple sheet and specific columns (ex: variable "LGRF_Fx" at each 3 trials). Below is the what I am trying to get the values.
I would appreciate sombody help me to find out.
-----------------------------
S01 = xlsread('Walking_Mastersheet_1.xlsx', 1);
T1 = S01(:, 10)/9.8;
T2 = S01(:, 19)/9.8;
T3 = S01(:, 37)/9.8;
S01=[T1,T2,T3];
S02 = xlsread('Walking_Mastersheet_1.xlsx', 2);
T1 = S02(:, 10)/9.8;
T2 = S02(:, 19)/9.8;
T3 = S02(:, 37)/9.8;
S02=[T1,T2,T3];
S03 = xlsread('Walking_Mastersheet_1.xlsx', 3);
T1 = S03(:, 10)/9.8;
T2 = S03(:, 19)/9.8;
T3 = S03(:, 37)/9.8;
S03=[T1,T2,T3];
.
.
.
DataTable = [S01,S02,S03....S15];

採用された回答

Bob Thompson
Bob Thompson 2019 年 4 月 25 日
What exactly is your question? What specifically do you need help with?
xlsread is only able to read one sheet at a time, so when reading multiple sheets it is necessary to call xlsread for each sheet.
Based on the context, I'm going to guess part of what you're asking for is a way to automate the process. Because you are looking for the same cells in each sheet that is relatively easy.
DataTable = [];
for i = 1:numsheets
tmp = xlsread('Walking_Mastersheet_1.xlsx',i);
DataTable = [DataTable,tmp(:,10)/9.8,tmp(:,19)/9.8,tmp(:,37)/9.8];
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by