How to input excluded data
Mostra commenti meno recenti
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 Commenti
darova
il 8 Apr 2020
Can you show how data looks like?
Justine Pearce
il 9 Apr 2020
darova
il 9 Apr 2020
Can you make a simple example of result you want to see? input data -> data after processing
Justine Pearce
il 9 Apr 2020
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Mathematics and Optimization in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!