LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array Increment and reshape and extract numbers from it

I have two arrays first array contains number from 0 to 15 and  second array data varies from 0 to 15

My requirement is 

when I am extracting number 0 and 1 from array 1 then my second array should take values from 2 to 15 and extract number in pairs from array 2 such as (2,3),(3,4)(4,5)(5,6)(6,7)(7,8)(8,9)(9,10)(10,11)(11,12)(12,13)(13,14)(14,15) after completing this 
 I am extracting number 1 and 2 from array 1 then my second array should take values from 3 to 0 and extract number in pairs from second array such as (3,4)(4,5)(5,6)(6,7)(7,8)(8,9)(9,10)(10,11)(11,12)(12,13)(13,14)(14,15)(15,0) after completing this
 I am extracting number 2 and 3 from array 1 then my second array should take values from 4 to 1  and extract number in pairs from second array such as (4,5)(5,6)(6,7)(7,8)(8,9)(9,10)(10,11)(11,12)(12,13)(13,14)(14,15)(15,0)(0,1) after completing this procedure of extracting numbers it should repeat upto last extraction of number from array 1 that is (15,0) and accordingly extraction of numbers from second array should be done I used indexed array for extracting numbers from array  but for rest of the code i am not getting what logic should i implement.

NOTE:I am not using bracket in my code I used here in my question for better understanding of my question

Thank u

0 Kudos
Message 1 of 4
(2,533 Views)

Remove index [x,y] from array 2. (delete from array)

Split the resulting array at X. (split array)

and build a new array with the two split parts in reverse order. (build array)

Loop through array and extract index n and n+1. (for loop)

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 4
(2,521 Views)

Sorry, I don't have any idea what you are trying to do.  I don't understand the operation "Extract" -- it does not seem to "remove" elements.  I do not understand what Array 1 and Array 2 really contain (are they all the numbers from 0 to 15, in order, i.e. 0, 1, 2, ..., 15?  Something else?).  I do not understand how Array 1 and Array 2 change after any of the operations you describe.  I do not understand how the process starts, how it continues, and how it ends.

 

I realize this might be a "language" problem.  Perhaps if you explicitly showed us a smaller example (say an array of 5 elements, step by step) it would clarify the procedure.

 

Bob Schor

0 Kudos
Message 3 of 4
(2,514 Views)

I am with Bob here. Makes very little sense.

 

Why don't you attach a small VI that contains the various input arrays and desired results as default values of controls/indicators.

 

What is "extract"? What is "this" (in completing this), what is the difference between "contains from 0 to 15" and "varies from 0 to 15"? What is "take"? Do these arrays have 16 elements or can each number occur more than once? Are they sorted? If the element value are identical to the index, you don't even need arrays.

0 Kudos
Message 4 of 4
(2,470 Views)