finding out the frequencies of numbers within coloumns
Show older comments
Hii I have two coloumns matrix, first coloumn temperatures, while the other moisture values.. I want to find out the frequeincies for each temperature with each moisture and vice versa, ensuring to take all the probabilities ofoverlapping. For example:what is the number of occurence of 1 degree and 0.23 moisture, 1 degree and 0.4 moisture, and so on then, 2 degree with each of moisturesvalues.. CAN YOU HELP ME PLZ
Accepted Answer
More Answers (3)
Yasmine
on 28 Feb 2012
0 votes
1 Comment
Sven
on 29 Feb 2012
Then you just need to do one prior step: choose your "ranges", then round your values into those ranges. For example, the following lines make some random numbers between 0 and 1, then makes 11 bins from 0 to 1 at intervals of 0.1, then asks, "which bin is each of my values nearest to?". After getting this kind of result for your data, you can run the code in the answer.
rawData = rand(50,1)
binCenters = 0:0.1:1
whichBins = interp1(binCenters, 1:length(binCenters), rawData,'nearest')
Yasmine
on 1 Mar 2012
0 votes
Yasmine
on 1 Mar 2012
0 votes
Categories
Find more on Graph and Network Algorithms 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!