产生随机数0或1,随机数值分别对应两种情况,求写出框架。
Afficher commentaires plus anciens
以一定的概率产生一个随机数0或者1,如果等于0时t=0,如果等于1则t的值用某个循环给出。
求大神写出框架。
写了半天总报错。。报错大概是说我的随机数用a=int16(rand(1))和后面循环语句 if a==0 这里。。
万分感谢!
Réponses (0)
Catégories
En savoir plus sur 随机数生成 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!