difference between using max and length in histogram
1 次查看(过去 30 天)
显示 更早的评论
What it the difference between using max and length in histogram?
采纳的回答
Azzi Abdelmalek
2014-7-25
A=[1 2 10 3]
Try
max(A) % The greatest value in A
and
length(A) % number of element in A
0 个评论
更多回答(1 个)
Josh
2014-7-25
1 个评论
Image Analyst
2014-7-26
No. X(i) can be any integer value between 1 or and length(p)+1. Those values are independent of the max value of X since you could have different X(i). We don't know how long X is. For example, maybe X = [10, 30, 100, 4, 16], so length(X) = 5 while max(X) = 100. Rand is different for each i so that's why the values of X could be different for each i, and thus the max value is independent of the length, except in very coincidental cases.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Histograms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!