08-11-2010 12:01 PM
Hello everyone,
I have a quick question which I have yet to find the answer for anywhere else.
I have a 3 dimensional array that contains one element per dimension. I want to be able to square these elements then add them together. I have accomplished the squaring by using the polymorphic functionality of the square function. Now I want to add all 3 elements ( one element per dimension) into one scalar type. Does anyone know how to do this?
Thanks,
Cheers!
Solved! Go to Solution.
08-11-2010 09:37 PM
If you have a 3-D array that is 1 element per dimension, that means you have a 1 x 1 x 1 array, doesn't it?
Can you post a VI where you have saved your 3-D array as a constant, and also tell us what you expect the result to be. Because with the way you described the array, the operations you want to do to it don't make sense. You say one element per dimension, but then you say you have 3 elements. A 1 x 1 x 1 3-D array has a grand total of one element.
08-11-2010 09:52 PM
The Add Array Elements is just as happy with the 3D array as the Square function.
What brings you to this particular structure is perhaps another question.
08-14-2010 04:45 PM
Thanks Darin! Very helpful. I can not believe I missed that before.
I apologize for the crude explanation before. I was wrong, the proper way to describe this would be a 3D "1 X 1 X 1" array.
I have been programming for about a year in LabVIEW. Unfortunately, this year of programming have been very specific up until now, and with no formal training I tend to skip, or overthink problems like these. (Even though there is a built in function)
Thanks for the help.
Have a great day.