11-03-2008 09:58 PM
11-03-2008 10:09 PM
11-03-2008 10:10 PM
11-03-2008 10:16 PM
Decimate only works for 1D array, so this needs a bit more work. Still, it should not be too difficult. 🙂
scoccer wrote:
For example, if I have a 1000 by 300 2-D array and I want to average every 3 lines in this array to make it a 1000 by 100 array. How can I do this? Thanks!
Is a "line" a column or a row?
(And no AutoTEX, "delete from array" makes no sense at all for this.)
11-03-2008 10:25 PM
Sorry I am not familiar with arrays, do I need to use a loop or something like reshape array to make it a 1d array to use the decimate? Thanks!
In this example, a "line" is a column.
11-03-2008 10:28 PM
Hi
Check the attachments
11-03-2008 11:04 PM - edited 11-03-2008 11:05 PM
OK, here's a simple way to do this (LabVIEW 8.0)
11-03-2008 11:16 PM
Santhosh M wrote:![]()
This is extremely inefficient, because the array in the shift register changes constantly, forcing new memory allocations with every iteration. This will be orders of magnitudes slower than a solution that operates in-place.
I would strongly recommend against this solution. 🙂
11-04-2008 09:12 AM
altenbach wrote:OK, here's a simple way to do this (LabVIEW 8.0)
Message Edited by altenbach on 11-03-2008 09:05 PM
That's exactly what I was thinking, except I didn't realize the decimate array wouldn't work on the 2-D array, and I wasn't on a LV computer at the time to work up the example.
11-04-2008 09:35 AM