LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a 2D array with random numbers

So i am able to create a 5x10 2D array with random numbers.  however im trying to figure out how to assign each row a giveen value range. 

 

such as:

Row 1: 0-1

Row 2: 1-0

.

.

.

Row 10: 9-10

 

Can someone give me a hint on how to acomplish this task.

Message 1 of 16
(16,599 Views)

Homework time at uconn? 😄

 

Put the dice in the inner loop. Then, in the outer loop, add [i] to the 1D array. See how far you get.

Message 2 of 16
(16,597 Views)
I tried putting multiple loops on the inside and adding one to the first and two to the second but then I couldnt get it to display in an array.
0 Kudos
Message 3 of 16
(16,595 Views)

@calavan11 wrote:
I tried putting multiple loops on the inside and adding one to the first and two to the second but then I couldnt get it to display in an array.

I don't understand a word what that all means. LabVIEW is graphical, so show us a picture instead!

 

(How many are "multiple"? inside of what? first of what? second of what? get what to display?)

0 Kudos
Message 4 of 16
(16,592 Views)

Am i going in the right direction.  I have read my text book and looked at the examples but i am really strugeling with the arrays.  I have posted what i have so far.

0 Kudos
Message 5 of 16
(16,582 Views)

I'll give you a hint, since this is homework, so I'm not giving you the answer. What happens if you wire a value out of a loop with autoindexing turned on? Do you get a number or an array? What happens if you put another loop around that, so the output from the first loop goes through another autoindexing operation? Do you get a number, or an array? If it's an array, is it the same type of array, or different?

Message 6 of 16
(16,580 Views)

I'll give you a hint, since this is homework, so I'm not giving you the answer. What happens if you wire a value out of a loop with autoindexing turned on? Do you get a number or an array?(You get an array) What happens if you put another loop around that, so the output from the first loop goes through another autoindexing operation? Do you get a number, or an array? If it's an array, is it the same type of array, or different? Different

 

Im sorry to be a pain, but i am still not grasping all the elaments that are going into this problem. 

0 Kudos
Message 7 of 16
(16,574 Views)

Try again to read my very first reply:

 

What could I have possibly meant with [i]? Is there something in the outer loop that would fit that description? 😮

Message 8 of 16
(16,567 Views)

WOW!  I feel like a true idiot, ithought it was adding 1.  I didnt pay close enough attention to [i].  I am so sorry for wasting your time.

0 Kudos
Message 9 of 16
(16,561 Views)

I think you attached the wrong VI.

Message 10 of 16
(16,555 Views)