How to count frequency of values in a 3D array
Show older comments
Hiya,
I have a 3D array (rol,col,month) with values 1-8
I want to count the number of times each value occurs each month to then be able to produce a time series plot of number of occurrences against time. The row and column the value is in is not important just the month
Thanks!
Answers (1)
Andrei Bobrov
on 28 May 2014
Edited: Andrei Bobrov
on 28 May 2014
out = histc(reshape(yourdata,[],size(yourdata,3)),1:8);
Categories
Find more on Vehicle Dynamics Blockset 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!