LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview 5.1 can't use index array with 2D array

I am using LabVIEW 5.1 and I'm trying to replace the xaxis of a graph with a calibrated x axis. To do this I must replace one dimension of the 2D array which is generated by my camera. The problem is that I can't use the index array function with this data. The input is a 2D array of singles. Is there something I should do to this array first?  I also tried the replace index array vi but that also wouldn't accept my array. What are my options?

Thanks
0 Kudos
Message 1 of 4
(2,806 Views)


@Shellpetal wrote:
To do this I must replace one dimension of the 2D array which is generated by my camera. The problem is that I can't use the index array function with this data. The input is a 2D array of singles.

I don't understand how you want to replace one "dimension" of a 2D array. Are you possibly trying to replace one row or column instead?

I am pretty sure that index array will work with 2D arrays, even in 5.1. It seems you want to replace existing values, so "replace array element" is probably the right function. I would just autoindex the 2D array using a for loop, then you only get a 1D array inside the loop where you can replace desired element. I think I still have an old computer with 5.1 (or even 4.0) at work, so I might be able to look into this next week.

0 Kudos
Message 3 of 4
(2,768 Views)
Thanks for the help! My problem was that I wasn't adding a dimension to the replace array element vi. Once I did that it all worked fine.

Cheers
0 Kudos
Message 4 of 4
(2,753 Views)