08-13-2009 01:37 PM
Are there functions that input a vector, break it down to it's component vectors and back again?? My application involves averaging wind speed and direction. I want to average 60 one second wind vectors by averaging the components and then converting the averaged components back to a single vector of wind speed and direction. Thanks in advance for the help.
08-13-2009 01:40 PM
Am I understanding your question correctly:
You want to resolve a vector into an x-component and a y-component.
You want to average all the x's, and all the y's, then build them back into a vector?
08-13-2009 01:54 PM
08-13-2009 02:44 PM
You need first to decide about the repesentation of you vectors. You could make a cluster of the componente, or and array where by index 0 will be the first component, index 1 the second component and so on, or if you stick to 2D you could use complex numbers for the vector representation.
Please find attach an example for averaging 3D-vectors based on the first method a cluster of the components.
08-13-2009 02:47 PM
Cory--
That is exactly what I want to do.
S
08-13-2009 03:04 PM
08-17-2009 09:23 AM
08-17-2009 09:28 AM
altenbach wrote:
I would recommend to combine the two arrays into a complex (CDB) 1D array. The averaged vector is simply Sum/N.
Hi Christian,
I recently had to do some averaging of vectors in three-space and resorted to using complex to do this. As I was doing my code I was thinking "how would Christian have done this?".
Do you have Nuggets of wisdom you could share regarding vectors with more tahn two components.
Curious,
Ben
08-17-2009 09:34 AM
08-17-2009 12:04 PM