[Beginner] How do you make a summary table?

3 visualizaciones (últimos 30 días)
Michael Burton
Michael Burton el 16 de Ag. de 2018
Respondida: Steven Lord el 16 de Ag. de 2018
Sorry if this is a beginner question but I spent over an hour searching online and cannot find it. Maybe I don't know the right search terms but I genuinely tried and cannot find it.
I have a table of ~2.5 million sensor readings from ~100 sensors. I have made a second table with sensor IDs. I want to add rows to the table which spit out summary statistics. For example, I want to know how many times each sensor chirped. I can find that out by doing "height(Data(SensorID=='[Sensor Name]',:))" but when I put "MasterTable.NumOfReadings = height(Data(SensorID=MasterTable.SensorID,:))", I get an error saying the tables are not the same size (duh).
In short, I want to know: If I have tables T1 (A x 2+) and T2 (B x 1) in which T1 is the raw data T2 is the unique categorical values of T1 (and thus A>B), how do I add rows to T2 which perform operations on the data entries in T1 with matching categorical data of the values in T2?
If it helps, the forumla in excel would be =CountIf(Data[@SensorID],MasterTable[@sensorID]).

Respuesta aceptada

Steven Lord
Steven Lord el 16 de Ag. de 2018
Try using groupsummary on your larger table with the data readings.

Más respuestas (0)

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by