largest number of blocks
Show older comments
if i have v= 1:1:20 and its value are, a=[3,6,9,3,7,12,4,62,3,8,8,9,8,4,8,2,8,3,3,3] respectively.
Within the range of the minimum and maximum value of these a's, number of bins of equal width are set up.
then how to count The number of 'v' with a's within each bin and the bin with the largest number of 'v' .
4 Comments
José-Luis
on 1 Feb 2013
This sounds like homework. What have you tried so far?
Andreas Goser
on 1 Feb 2013
It is super unlcear what a block is. A Simulik block and there are parameters or signals you are talking about?
vipul utsav
on 1 Feb 2013
José-Luis
on 1 Feb 2013
It is just an impression. If I have to analyze it, I would say it sounds like homework because of the way the question is phrased. But even then, it is always a good idea to show what you have actually tried, instead of asking people to give you an answer.
Answers (1)
Jan
on 1 Feb 2013
0 votes
You need sort or min & max to get the range of the input, linspace for equally distributed bins and histc for counting and locating the related bin index.
Categories
Find more on Matrix Indexing 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!