how to count number of values present in some defined intervals?

8 ビュー (過去 30 日間)
TRAILOKYA
TRAILOKYA 2014 年 3 月 29 日
コメント済み: TRAILOKYA 2014 年 3 月 31 日
Hi, suppose i have a column matrix (:,1). i have to count the number of values lying in the interval say 0-2,2-4,4-6,6-8,8-10. for example say i have a column matrix of values 0.1, 0.2,1,1.9,2.1,2.5,3,4.1,5,5.2,6,8,9.1,9.9. if i have to count the values lying in the given interval how to do it in matlab??? please help

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 3 月 29 日
a=[0.1, 0.2,1,1.9,2.1,2.5,3,4.1,5,5.2,6,8,9.1,9.9]
id=[0 2 4 6 8 10]
freq=histc(a,id)
  2 件のコメント
TRAILOKYA
TRAILOKYA 2014 年 3 月 31 日
thanks a lot :)
TRAILOKYA
TRAILOKYA 2014 年 3 月 31 日
Hi I have also another problem similar to this. Suppose i have m*3 matrix having values of latitude, longitudes and constant number say (0.01,0.5,0.8,1.0,2.5,3.6,5.6,40.0,37.5.....n; 88.9,60.5, 60.6, 87.5, 85.3,99.9, 84.6, 89.5, 90.3, 60.5, 61.3 ....n; 455, 455, 455, 455,............n); the latitude and longitudes values are not ascending or descending, these are scattered values.. if i have to count the count the frequency of the constant number 455 for some interval say for latitude 0-2.5 and longitude 60-62.5, 62.5-65,65-67.5, 67.5-70.....97.5-100 how can i do it sir? please help ...thanks again

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScatter Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by