How to count frequency of values in a 3D array

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)

out = histc(reshape(yourdata,[],size(yourdata,3)),1:8);

Categories

Find more on Vehicle Dynamics Blockset in Help Center and File Exchange

Asked:

on 28 May 2014

Edited:

on 28 May 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!