Grasshopper

algorithmic modeling for Rhino

Noob here. Just curious. How do you output the most displayed number in a list of numbers? Would that be calculating the mean of a list?

Views: 1063

Replies to This Discussion

Hi John,

 

I think you're looking for the mode, not the mean. There's no direct way to compute the mode, but what you could do is use a Pie Chart to display the data set. If one value occurs way more often than others it will be visually obvious.

 

I can't think of a good way of doing this without using scripting, if you badly need this, I can write you a VB script.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

You could do it with the Set Components [Create Set], [Member Index] and then [Sort]

 

EDIT: looks like systemiq beat me to it

this actually, works. would this account for the list of numbers not have some number repeated more than once?

 

Thanks!

The number would have to appear at least once to get inclusion in the set.

Most displayed number is first in the right panel.

Didnt test it much, may be wrong.

EDIT: smiley !

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service