[Beginner] How do you make a summary table?
3 views (last 30 days)
Show older comments
Michael Burton
on 16 Aug 2018
Answered: Steven Lord
on 16 Aug 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]).
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!