LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with makeing a vi with 2d array with 10 rows and 5 columns

Im new to labview and i need help with E6.7 in labview 2009 book.

 

I need to Construct a Vi that outputs a  2d array with 10 rows and 5 columns. The frist rows should contain five ramdom numbers in the range 0-1, the second row rumbers in the range 1-2, and so forth to the tenthrow, which should contain five random nubers in the range 9-10.

 

The main problem im haveing is how to make a 2d array and how to get the output in to  the specific row and columns.

0 Kudos
Message 1 of 8
(3,765 Views)

start out constructing a 2d array with 2 for loops...outside for loop is your rows and the inside for loop is your colums

0 Kudos
Message 2 of 8
(3,763 Views)

ok this is what i got, now the problem is that i want both for loops to  go to the same output array 

0 Kudos
Message 3 of 8
(3,751 Views)

edit:  ok this is what i got, now the problem is that i want both for loops to  go to the same output array 

 

(forgot to add the file)

0 Kudos
Message 4 of 8
(3,749 Views)

your almost there...did not realize this was homework? this one is a freebee Smiley Wink

Example_VI_BD.png

0 Kudos
Message 5 of 8
(3,737 Views)

ok i understand thats how you get a 2d array. But what if i wanted to have 2 of the for loop going to 1 array. I need the frist row to be a ramdom number between 0-1, the 2nd row to be 1-2, the 3rd row 3-4 ,the 4th row 4-5 ,the 5th row 5-6

the 6th row 6-7 ,the 8th row 7-8, the 9th row 8-9 and, the 10th row 9-10.

0 Kudos
Message 6 of 8
(3,706 Views)

 its seem so obvious now. i was stuck on that for like 2 hours. thank you

0 Kudos
Message 7 of 8
(3,702 Views)

@fxgbhsfh wrote:

 its seem so obvious now. i was stuck on that for like 2 hours. thank you


dont feel bad...it took me 3 hours
Message 8 of 8
(3,671 Views)