LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

double for loop

Hi,
 
I am trying to modify the content of a 2D for loop using a double for loop. But the result I am getting is always 0 in the loop i am getting... I am not really too sure of the problem. Can anyone help?
 
Thanks
 
 
0 Kudos
Message 1 of 3
(2,792 Views)
The results are not 0. the VI has replaced all of the elements in the intial array with random numbers. You've got an initial array with 3 rows and 3 columns but your inner for loop iterates 10 times. You cannot do a replace array element on an array element that is empty. You simply have to set the iteration count of the inner most for loop to be the same as the number of columns. You did that with the outermost for loop. Why did you use a constant of 10 for the inner loop?
Message 2 of 3
(2,783 Views)
Also, your result is not zero. When I opened the VI, your array is showing row 7. You're just not looking at the right part of the array. Go up to 0,0 and you'll see the random numbers.
Message 3 of 3
(2,768 Views)