产生随机数0或1,随​机数值分别对应两种情​况,求写出框架。

2 views (last 30 days)
华纳万宝路公司客服【558766.com】
以一定的概率产生一个随机数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

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!