Photonics – Chinese

Photonics – Chinese

Topics related to Lumerical and more, in Chinese language.

关于randreset和MATLAB的rng命令的问题

    • shangxiangshuo
      Subscriber

      老师好!

      我在lumerical中执行了如下代码:   

      randreset(1);

      a = randmatrix(100,1);

      然后在MATLAB执行了如下代码:

      rng(1);
      a = rand(100,1);

      结果对比如下:

      可见,对于同样的随机数种子,lumerical生成的随机数序列的奇数项与MATLAB生成的随机数序列完全符合,而偶数项则来自未知的随机数序列。请问偶数项的随机数序列来自哪里?如果我想通过MATLAB获得与lumerical完全一致的随机数序列,我该如何操作呢?

    • Kirill
      Forum Moderator

      Dear Subscriber, 

      In order to assist you better, could you please share the following: 

      Which operating system and version of Lumerical are you using? Please send a screenshot of the Lumerical CAD > Help > About... page, which provides this information (like this image). 

      Thank you! 

      • shangxiangshuo
        Subscriber

        您好!我使用的是windows系统,谢谢!

    • Kirill
      Forum Moderator

      Please send a screenshot of the Lumerical CAD > Help > About... page, which provides this information (like this image). 

Viewing 2 reply threads
  • You must be logged in to reply to this topic.