取消
显示结果 
搜索替代 
您的意思是: 

how to make a random generator with a max and a minimum

hello
can anybody telle me how to make a random generator for numbers with a maximum and minimum input

thanks in advance
0 项奖励
1 条消息(共 8 条)
6,112 次查看
Use the random number vi.  Multiply by the range (maximum - minimum) and add the offset (minimum).
----
I am the founder of CnCSoftwareSolutions. When not cleaning up baby drool, I write about test data or work on Vision, a tool for understanding your test data. Visit me at www.cncsoftwaresolutions.com
0 项奖励
2 条消息(共 8 条)
6,102 次查看
3 条消息(共 8 条)
6,103 次查看
Also, the OpenG numeric library has a "Random Number - Within Range" VI.

0 项奖励
4 条消息(共 8 条)
6,095 次查看
Thanks Jasonhill !
very fast reply

I'm a newbee at this so I have another question
I'm going to explain the situation :

I have to create a random number within limits for each month of the year
I want to put in the maximum and minimum in an array

How do I get the maximum and minimum for a particullar month in an array?

thanks in advance and sorry for my bad English
0 项奖励
5 条消息(共 8 条)
6,087 次查看

Hi suske,

If you want a random day for a given month, this is how I would do it.

Hope this helps,

-D

Message Edited by Darren on 02-02-2006 01:35 PM

6 条消息(共 8 条)
6,082 次查看
sorry, that was not what I ment  (thanks for the reply anyway)
lets work in steps

when I give in a number 1 -> 12  the month that stands for it will appear
now that month has a minimum and maximum limit I gave in before.
Those are the limits I want to use for my project..


thanks in advance
0 项奖励
7 条消息(共 8 条)
6,069 次查看

Why not use a Ring that contains the names of each month?  That way there's no way somebody could enter an invalid value.

-D

0 项奖励
8 条消息(共 8 条)
6,069 次查看