Grasshopper

algorithmic modeling for Rhino

Hi, I was wondering if anyone may have an answer to this problem I am having.

I want to compute the weighted averages of 6 different datasets.

I have 96 values per set and they are stored in a tree with 6 branches and 96 values per branch.

How can I find the weighted values of each branch in the tree?

For each branch, I need to take each item and subtract it from every other item in the branch. Then take the length of the branch - 1 (95) divided by the sum of each subtraction. http://upload.wikimedia.org/wikipedia/en/math/a/e/7/ae79a689e288c86...

I am able to do this by grabbing 1 branch and doing the calculations, but this requires me to flatten the list at points, which obviously will not work when I try to do the computation on the entire tree and not an isolated branch.

Attached is an image of the definition I built to compute the weight values for a specific branch.

Thank you.

Views: 556

Attachments:

Replies to This Discussion

As far as I can see you are always going to be dividing by zero using this method but maybe I'm not understanding you correctly.

Chris

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