How to discretize?

3 ビュー (過去 30 日間)
Kunal Roy
Kunal Roy 2016 年 9 月 19 日
回答済み: Sean de Wolski 2016 年 9 月 19 日
Suppose I had 51,42,43,56,76,54,34,56,78,80 in a column how would I use discretize function to put the numbers between 50-59 into 50, and those between 60-69 into 60 and so on?

採用された回答

Sean de Wolski
Sean de Wolski 2016 年 9 月 19 日
bins = 0:10:100;
x = [51,42,43,56,76,54,34,56,78,80]
newx = bins(discretize(x,bins))

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by