产生随机数0或1,随机数值分别对应两种情况,求写出框架。
Show older comments
以一定的概率产生一个随机数0或者1,如果等于0时t=0,如果等于1则t的值用某个循环给出。
求大神写出框架。
写了半天总报错。。报错大概是说我的随机数用a=int16(rand(1))和后面循环语句 if a==0 这里。。
万分感谢!
Answers (0)
Categories
Find more on 随机数生成 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!