10-19-2013 01:36 PM - edited 10-20-2013 05:46 PM
@apok wrote:
does it have something to do with memory use for efficiency in that 'in place' was developed?
sorry for the hijack...
I wasn't talking specifically about the "in place element structure", but used the term "in place" generically. If you have an array in a shift register, all operations that don't change the size (e.g. replace array subset") can be done in place, without need of new memory allocations. Whenever you resize an array (e.g. with "built array") an new memory allocation might be needed. This can be very expensive with large data structures.
10-19-2013 02:13 PM
10-19-2013 02:54 PM
@ben64 wrote:
This is what I had in mind with the conditional indexing.
A bitwise AND with 1 is typically cleaner to determine even/odd. No need for divisions. 😉
10-19-2013 03:04 PM
10-20-2013 01:46 AM
Sir,
This is what I've tried after reading your instructions. Is it correct..??
10-20-2013 02:31 AM
Now we are extremly happy you started trying right way.
Don't use insert array in loop , use replace array subset ( how? you find out )
for even odd use bit wise AND ( i have learnt this from altenbach )
give try again . you are on your way ...........
10-20-2013 07:04 AM
Now I've tried this logic. This logic is sorting the array but not creating two different arrays...
10-20-2013 07:26 AM
To get two different array. you need to fill data in two different arrays.
Now you are using the single array and filling the data in that array in both the cases
also put your array indicators outside the for loop.
10-20-2013 07:29 AM
and just saw why you are not getting any value at all.
Initialize the array with some value and fix length before using replace array subset
10-20-2013 01:36 PM - edited 10-20-2013 02:38 PM
@T_reX wrote:
Sir,
This is what I've tried after reading your instructions. Is it correct..??
Please attach the actual VI (or a snippet) instead of pictures, because we cannot tell what is in the other cases of the case structure and there is thus insufficient information to debug. If you attach pictures, crop them! (The next picture you attached contains huge amounts of whitespace).
Some comments (you are learning fast!):