NI LabVIEW,CVI,数据采集等产品讨论区

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

读取不同数组,或者生成一组不同整数问题。

已解决!
转到解答

各位,请教的问题如标题,谢谢!

0 项奖励
1 条消息(共 7 条)
6,579 次查看
Please be more detail in describing your problem i.e. with sample data etc.
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
2 条消息(共 7 条)
6,564 次查看
谢谢你的关注。问题是这样,想用LV做一个考试模块,从一定数量的题库中随机读取一定的不同数量的考题。谢谢支持!
0 项奖励
3 条消息(共 7 条)
6,556 次查看

Hi,

 

I hope that I understand your question/ problem well... that you want to randomly pick a set of questions from a fixed set of questions... ? (even I got stuck in putting the sentence up :p)

 

You may make use of the Random Number (0-1), multiplies it with 10 and rounds it down to obtain a random number of 0~9.

It is then used to index a set of C.S.V (comma-separated-values) representing the indexes of the questions in a fixed set of questions (array). 

 

The set of questions are then extracted with a for-loop.

 

PS: please refer to attached for reference...

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
4 条消息(共 7 条)
6,550 次查看

hi,

看来是我没把问题说清楚,比如说从1~100个整数中随机生成20个不同的数据。谢谢你的答复。

0 项奖励
5 条消息(共 7 条)
6,542 次查看

http://www.eefocus.com/csxcs366/blog/08-09/157316_6e271.html

上面的文章说明如何创建0-100不重复随机数问题。

对随机数组任意取出20个, 利用LV的随机数发生器×80,随机确定开始索引,取出20个即可。

陈树学
QQ:276509891 .
EMAIL:CSXCS_366@126.COM
qq群:78561268 80754347 37591940
http://labview.weebly.com/
新书《LabVIEW实用工具详解》已经发售,敬请关注。
6 条消息(共 7 条)
6,538 次查看
解答
已被主题作者 LIONCSU 接受
Thanks ian fung and veteran friendly answer!
7 条消息(共 7 条)
6,515 次查看