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.

break的用法

    • 2022100400
      Subscriber

      想问一下break是不是不能用在if函数里面啊,如果要这么用的话应该怎么改啊

    • Guilin Sun
      Ansys Employee

      可以啊:

      break 后整个脚本就停止工作了。

       

    • 2022100400
      Subscriber

      但是如果是双层循环的话,使用break也是停止工作,如下左图,我只想要停止里面那层循环,如下右图的matlab结果所示

    • Guilin Sun
      Ansys Employee

      Break 是要停止整个脚本的工作。目前没有其它软件的“go to" 功能,你试一试”Try“ 是否合意。https://optics.ansys.com/hc/en-us/articles/360037228834-Lumerical-scripting-language-By-category

      如果不行目前可能只能用Matlab之类的第三方软件了。但是要注意,将FDTD数据输给Matlab需要均匀化网格 

      Ansys Insight: Matlab画图失真问题

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