LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generate two different number

Solved!
Go to solution

how can i generate two different number?The first must be always bigger than the second.

0 Kudos
Message 1 of 19
(3,376 Views)

You may need to tell us what constraints apply to the first number. After generating the first number, use Increment to add 1 to it to produce the second number. 

 

Lynn

0 Kudos
Message 2 of 19
(3,371 Views)

Of course, Lynn meant "decrement" to make the second number smaller than the first, which makes the first bigger than the second ...

 

BS

Message 3 of 19
(3,362 Views)

Yes.  I should read the posts more carefully.

 

Lynn

0 Kudos
Message 4 of 19
(3,355 Views)
Homework?
0 Kudos
Message 5 of 19
(3,354 Views)

Here you go.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 19
(3,348 Views)

Thx

Yes it's homework .i have to do operations with two random numbers.And the value cant be negative

0 Kudos
Message 7 of 19
(3,335 Views)

sorry.I dont really understand what you say.i think i expressed myself wrong.So i have to generate two different random number.and the value cant be negative.So the first number must be always bigger than the second.

sorry but we started to learn labview few weeks ago

 

0 Kudos
Message 8 of 19
(3,319 Views)
What have you done? You have the random number generator on the palette and were given one solution.
0 Kudos
Message 9 of 19
(3,306 Views)
Solution
Accepted by topic author szabolcs1295

Only itegers or also fractional/decimal numbers?  Any real range of values you can use?

 

I would just generate two numbers (based on whatever parameters you may have) and then use Max & Min to sort them.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 19
(3,302 Views)