LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How would you remove every 6th (or nth) element of an array?

Solved!
Go to solution

@_Y_ wrote:

Florian.Ludwig, I wonder how Reshape Array works with memory alocation? If it uses the same phisical memory, your solution is better than my. However, if I understand the manual literally ("... reads the array data in memory from left to right, row by row ... adjusts the array data in memory ... "), the memory is realocated.


I'm pretty sure the reshape uses the same memory.  All it has to do is change a few flags that tell how many elements are in a row and number of colums.  Otherwise the memory containing the array is unchanged.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 12
(738 Views)

Reshape array will use the same memory, provided the reshape uses the same amount of memory, such as this case.

 

A relatively fast way to remove multiple elements from a 1D array can be found here, fourth example (along with more discussion on memory management and speed).

Message 12 of 12
(709 Views)