How to input excluded data
Mostrar comentarios más antiguos
So I have recorded behaviours 'Tier_Labels' (e.g. walking, running, sitting) for individual birds (identified by Bird, Pen & Strain). I have aggregated the data to develop a cumulative sum each specific Tier_Label was performed at different habituation times.
%% Aggregation SPSS Function in Matlab
% Creates a table of SUM Total_Duration2 for each Tier Label
G4 = groupsummary(T,{'Bird','Pen','Strain','Habituation','Tier_Labels',},'sum', 'Total_Duration2')
However, some of these behaviours, don't occur for every bird, at every habituation time. I was to create code (potentially a loop) which will say:
For every individual (Bird,Pen,Strain,Habituation),
If 'Behaviours' are missing from the recorded 'Tier_Labels'
Add in a row with that behaviour listed as Total_Duration 0.00
I think a loop is the right way forward but I'm a novice at coding and I'm not sure if there is function that can look at a variable and identify missing labels from a pre-written varibale and then input these into the data set.
Hopefully that makes sense, can anyone help? Or give me some pointers in the right direction?
Thanks :)
4 comentarios
darova
el 8 de Abr. de 2020
Can you show how data looks like?
Justine Pearce
el 9 de Abr. de 2020
darova
el 9 de Abr. de 2020
Can you make a simple example of result you want to see? input data -> data after processing
Justine Pearce
el 9 de Abr. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Mathematics and Optimization en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!