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!

답변 (1개)

Andrei Bobrov
Andrei Bobrov 2014년 5월 28일
편집: Andrei Bobrov 2014년 5월 28일

0 개 추천

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

카테고리

도움말 센터File Exchange에서 Vehicle Dynamics Blockset에 대해 자세히 알아보기

질문:

2014년 5월 28일

편집:

2014년 5월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by