Taking means of initial values in individual cells of structure
1 回表示 (過去 30 日間)
古いコメントを表示
This is my first question in here, so excuse for lacking syntax or structure:
I have a structure ('tracks') containing many fields (fx 'A'), and in each row there is a cell containing a track of 1000frames.
I would like to estimate the initial values of all traces, but since there are noise, I'd like to pull out the mean value of the three initial values instead of just the initial value.
I have looked around matlab and seems to be needing the right formulation of a cell-function, but neither of my attempts, fx:
Int = cellfun(@mean, {tracks.A(1:3)}, 'UniformOutput', false);
Int2 = cellfun(@(x) mean(x), tracks.A(1:3), 'UniformOutput',false);
seems to be working.
Can anybody tell me what I am missing here, and how to write it correctly, please?
-very much appreciated
0 件のコメント
採用された回答
その他の回答 (1 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!