# LabVIEW

cancel
Showing results 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
(9,084 Views)

## Re: Create a 2D array with random numbers

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.

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 2 of 16
(9,082 Views)

## Re: Create a 2D array with random numbers

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.
Message 3 of 16
(9,080 Views)

## Re: Create a 2D array with random numbers

@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?)

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 4 of 16
(9,077 Views)

## Re: Create a 2D array with random numbers

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.

Message 5 of 16
(9,067 Views)

## Re: Create a 2D array with random numbers

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
(9,065 Views)

## Re: Create a 2D array with random numbers

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.

Message 7 of 16
(9,059 Views)

## Re: Create a 2D array with random numbers

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

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 8 of 16
(9,052 Views)

## Re: Create a 2D array with random numbers

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.

Message 9 of 16
(9,046 Views)

## Re: Create a 2D array with random numbers

I think you attached the wrong VI.

LabVIEW Champion. It all comes together in GCentral
What does "Engineering Redefined" mean??
Message 10 of 16
(9,040 Views)