mightcouldb1 Posted January 23, 2011 Share Posted January 23, 2011 (edited) So I want to compute the average of an attribute for all the points in each group. Right now I am doing... -ForEach group -inside is a vopsop with pcopen and pcfilter that filters the attribute This does a decent job at averaging the values together, but I want a perfect average. ((m + m1 + ... mN-1 + mN) / N) I was going to use python, but I'd rather find out how to do this with vops. Should look something like this: pt beans beans_avg 0 100 250 1 200 250 2 300 250 3 400 250 Thanks for the help! Edited January 23, 2011 by mightcouldb1 Quote Link to comment Share on other sites More sharing options...
tjeeds Posted January 24, 2011 Share Posted January 24, 2011 If you could do it ahead of time with a attributePromote node that would be ideal, promote it from point to detail with method set to average. If you must do it in VOPs I would use a For-loop, though it depends what context you are doing it in. VOPSaverage.hip Quote Link to comment Share on other sites More sharing options...
mightcouldb1 Posted January 24, 2011 Author Share Posted January 24, 2011 Wonderful! Thank you very much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.