Filter löschen
Filter löschen

How to discretize?

5 Ansichten (letzte 30 Tage)
Kunal Roy
Kunal Roy am 19 Sep. 2016
Beantwortet: Sean de Wolski am 19 Sep. 2016
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?

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Physics finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by