How to find the most common statistical value in an array?
显示 更早的评论
Assume that the array consists of real time recordings and appears to have five common values with unknown std (e.g. 5.1356 +/- 1.265, 13.2136 +- 1.564 and so on....). How could you find the most common values in that array with its limits included? One way to do that would be to use the mode function with predefined edges for your common values. But how could you do that without "cheating" ?
采纳的回答
更多回答(2 个)
grapevine
2012-6-27
0 个投票
Take a look at this function:
mode - Most frequent values in array
5 个评论
ref
2012-6-27
grapevine
2012-6-27
What's your array look like?
I mean, In which way do you represent your data ?
What I can guess is since you know the mean value and the standard deviation you can generate the normal distribution
http://www.mathworks.nl/help/toolbox/stats/normrnd.html
the function normrnd returns a data array, then you can use the mode function to find the most common value
ref
2012-6-27
Walter Roberson
2012-6-27
What would be permissible to access in that situation? The data used to create that graph? That graph appears to just be sort() of the original data, and when one is doing statistical work, the order of the data is not relevant (unless it is a time-dependent process), so having access to the sorted data would be equivalent to having access to the original data.
ref
2012-6-27
Image Analyst
2012-6-28
0 个投票
If your data are not integers, but are instead floating point numbers ( single or double), then depending on how they were generated, you may find that none of them are equal, even though you think they should be. See the FAQ on this topic: http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F In that case you should use hist() or histc() which will group values that are close to each other into bins.
类别
在 帮助中心 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!