Grasshopper

algorithmic modeling for Rhino

Taking the average of items between multiple lists

I have a simple question regarding lists.

I have 4 lists which each contain 16 values

I want to take the average of item 0 among the 4 lists

I then want to repeat this to determine average among item 1, item 2 etc...

... to determine a new list of 16 averages

When i pass two or more lists into the "average" component, it averages each list.

Any suggestions? I want to do this in a flexible way, as my item number will change (but all lists will always be of equal length).

One thought would be to construct a matrix, and then average each row, but again i did not find a working solution there.

Any general tips on how to do math on lists of numbers would be useful.

Thanks!

Views: 3162

Replies to This Discussion

Following up here with a graphic example of what i am trying to do

attached

Attachments:

Hello

you can try the following

cheers

alex

Attachments:

Excellent. That worked.  It also made me realize i was looking for the Max value, not the Average.  Can you advise on how to pass this data to the Max component? It appears to receive data in a different manner than the "average" component

Wicked.

I had just found a solution from viewing this post:

http://www.grasshopper3d.com/forum/topics/finding-a-maximum-value-in-a

thanks

you are welcome

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service