LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change 2D array index value

I am working on 2D array of size 1024x1280 (zero indexing). now i need to change both row and column indexing

row indexing change from (0,1,2,3....1023) to (0.5, 1.0, 1.5, 2.0, 2.5, ....., 512)

column indexing change from (0,1,2,3.....1279) to (0.5, 1.0, 1.5, 2.0, 2.5,........, 640)

 

I tried with property node IndexVals, but not success.. please help

0 Kudos
Message 1 of 7
(2,613 Views)

Have you tried using "reshape array"?


0 Kudos
Message 2 of 7
(2,609 Views)

1024x1280 means your array has 1024 ROWS and 1280 columns. The rows start from "0th" element to "1023th" element. I don't get what is "0.5th" element or "2.5th" element? 
Care to elaborate what you actually are doing? 


0 Kudos
Message 3 of 7
(2,606 Views)

Index to an array is an integer, it can't be float.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 4 of 7
(2,600 Views)

Ya 1024 rows and 1280 columns, index starts at 0 and ends at 1023, now i want to change this index starting from 0.5 to 512

 

only change of index

 

index      element          Index       element

  0               5                  0.5              5

  1              10                  1               10

  2               8                  1.5              8

  .                .                     .                .

  .                .                     .                .

1023          6                   512             6

0 Kudos
Message 5 of 7
(2,596 Views)

Index of an array can't be in float, it's an integer. However, from your problem I see that you want to make the size of your array to half i.e an array of dimensions 1024x1280 INTO 512x640, right? 


0 Kudos
Message 6 of 7
(2,590 Views)

Try this VI...!!

 

so by keeping this (attached) VI in between, you may consider that the index has changed from 1..1023 to 0.5..511.5.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 7 of 7
(2,575 Views)