How to use splitappy for only 10 rows in each group?
Show older comments
Hello,
I have a table wit numerous columns and rows (resultsT = 2795x23 table)
I want to use the split apply for calculating means and standard deviations on groups, separated with the help of findgroups over several variables from my table. OK, pretty simple .. BUT I want to do the calculations only on 10 rows for each group (random rows). Some groups have less then 10 rows (in this case dismiss, or whatever), and the most groups have 13 or 15 rows.
Anyone have an idea that could help?
Here is my code for the calculations for all the values whitin the groups:
[G,MessungError,Markiert,KalError,Calibrator,Tag]=findgroups(resultsT.MessungError,resultsT.Markiert,resultsT.KalError,resultsT.Calibrator,resultsT.Tag);
meanS1=splitapply(@(x) mean(x,1),resultsT.kSignal_1,G);
stdS1=splitapply(@(x) std(x,0,1),resultsT.kSignal_1,G);
Thank you very much in advance,
Marina
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!