필터 지우기
필터 지우기

Data in groups to new table

조회 수: 3 (최근 30일)
Marek Drliciak
Marek Drliciak 2023년 1월 14일
답변: Marek Drliciak 2023년 1월 15일
Hello,
I would like to ask for your advice. I have a Data.xlsx file. I would need to create a new "Table".
I'm just sending an example. The table "T15all" contains 2977 rows. New "Table" must have data from T15all in the first column. Next are the other columns (I assume "numel") from Data. The groups in the new "Table" will be created according to the variable "Data.ID15all".
I uploaded a new excel ("Result") where the results are processed in excel. I would need to import this procedure into Matlab. It will be a combination of "countif" and "vlookup".
Could you please help me?
I managed to use the "grpstat" command. I understand the error but I can't solve it.
well thank you

답변 (2개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023년 1월 14일
편집: Sulaymon Eshkabilov 2023년 1월 14일
(1) Import the data into MATLAB:
D = readmatrix('Data.xlsx');
(2) Convert to date time:
DTime = datetime(D(:,1), D(:,2), D(:,3), D(:,4), D(:,5), D(:,6), D(:,7));
(3) Convert to table:
Data = table(DTime);
Data = renamevars(Data, 'DTime', 'ID15all');

Marek Drliciak
Marek Drliciak 2023년 1월 15일
Thank you for your response. But this is not what I'm looking for. I uploaded a new excel where the results are processed in excel. I would need to import this procedure into Matlab. It will be a combination of "countif" and "vlookup".

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by