Borrar filtros
Borrar filtros

Data in groups to new table

3 visualizaciones (últimos 30 días)
Marek Drliciak
Marek Drliciak el 14 de En. de 2023
Respondida: Marek Drliciak el 15 de En. de 2023
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

Respuestas (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 14 de En. de 2023
Editada: Sulaymon Eshkabilov el 14 de En. de 2023
(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 el 15 de En. de 2023
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".

Etiquetas

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by