How to use use histc in multiple array
显示 更早的评论
i have the following cell array F=
[710x1 double]
[711x1 double]
[711x1 double]
[711x1 double]
[713x1 double]
[714x1 double]
I want to use the element in each array to build a bin with range x=1:0.5:10 using histc and then i want to take the average of the bin of all the six arrays. i know to access the values in the cell array but i have struggling to solve this problem. Any suggestion. Thanks.
回答(2 个)
Azzi Abdelmalek
2015-7-8
0 个投票
You can use a for loop
2 个评论
gustavo sanchez
2015-7-9
编辑:Azzi Abdelmalek
2015-7-9
Azzi Abdelmalek
2015-7-9
add this
a=cell2mat(F')
out=mean(a,2)
Andrei Bobrov
2015-7-9
编辑:Andrei Bobrov
2015-7-9
a = cellfun(@(x)histc(x,1:0.5:10),F,'un',0);
out = mean([a{:}],2);
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!