We have an exciting announcement about badges coming in May 2025. Until then, we will temporarily stop issuing new badges for course completions and certifications. However, all completions will be recorded and fulfilled after May 2025.
Photonics – Chinese

Photonics – Chinese

Topics related to Lumerical and more, in Chinese language.

FDTD_如何让monitor观测出的折射率精确到小数点后四位而不是后二位?

    • Rum Ayn
      Subscriber
    • Guilin Sun
      Ansys Employee

      这取决于你材料折射率。当折射率为1.4两位有效数字时,输出只能是两位:

      index=getdata("monitor_2","index_x");
      xx=index(131,:,1);
      ?xx(76);
      result: 
      1.4+0i  

      如果折射率为多位时:

      index=getdata("monitor_2","index_x");
      xx=index(131,:,1);
      ?xx(76);
      result: 
      1.40679+0i  

      用双精度显示:

        format long;
      ?xx(76);
      result: 
      1.406789000000000+0.000000000000000i  

      你看看如何?

       

    • Rum Ayn
      Subscriber

       

       

      还是不太对

       

       

       

       

    • Guilin Sun
      Ansys Employee

      你这是显示的,不是具体的数字,结果没有任何问题。作图的坐标量不可能显示很多位数,否则图看起来比较差。

      你需要查看具体数字。

      请参考之前的脚本。

      结果完全正确,不需要质疑。

Viewing 3 reply threads
  • The topic ‘FDTD_如何让monitor观测出的折射率精确到小数点后四位而不是后二位?’ is closed to new replies.