06-12-2014 12:30 PM
Hello,
I have a 3 dimension array. On the 10 rows i have 10 coefficients. On the collums i have an index representig the data for whitch the coefficients were built. On the third dimension, the page, i have, basically, the time evolution of the index-coefficient structure. What i need to do is make a simple sum like this: for each row-collum combination i have to sum the corresponding elements on the pages. I do not know hot to do this...
Can anyone help me please?
Solved! Go to Solution.
06-12-2014 12:39 PM
Use a For Loop to iterate through the pages and add each 2-D array to a running sum that you store within a shift register that is a 2-D array.
06-12-2014 12:40 PM
Can you just sum all the pages?
06-12-2014 03:29 PM
RavensFan , how can i do that? I am new to Labview and it is a bit difficult for me. I understand the principle but i can't figure out what blocks to use and how.
06-12-2014 06:58 PM - edited 06-12-2014 06:59 PM
See below.
06-13-2014 06:26 AM - edited 06-13-2014 06:33 AM
Thank you for the example. Unfortunatelly i have an error and i do not understand why... the interrupted line on the left is the 3D array. Can you please help me with this?
[Edit]: i've seen the problem...i put the wrong block.
06-13-2014 08:58 AM
Yep. You used Insert into Array (I find I rarely ever need that one), and you need Index Array (which has got to be the most heavily used of the array functions.)
I did this to get a 2-D array of the correct dimensions (by indexing out 1 page from the 3-D array) so that all the other pages can be added up.
06-13-2014 09:24 AM - edited 06-13-2014 09:24 AM
06-13-2014 09:45 AM
I knew you'd come up with a more compact way.
Though the idea of "zeroing" an array (by multiplying by zero) to initialize it is something I think I learned from you in some past thread.
06-13-2014 10:16 AM - edited 06-13-2014 10:25 AM
Thank you all for your responses!!
What shall i modify if i need to find the maximum. If the dimensions are: 74 pages, 24 rows and 10 collums i need a resulting 24 rows and 10 collums 2d array containing the maximum of the corresponding elements in the pages. i tried the Array max & min function but it does not meet the behaviour i need...it gives me the global maximum, wheres i need a set of local max.