Photonics – Chinese

Photonics – Chinese

老师,我按照addsweepparameter中的例子来添加扫描参数。但是我想将txt文档中的值导入到sweep中,如何让for循环里面的para.Value_i中的i值随着i的变化而变化

    • 739100686
      Subscriber

    • Zheng Zhou
      Ansys Employee
      您好,如果是这种情况可以参考使用 eval - Script command, 以下例子供参考:
      A=readdata("test.txt");
      for (i=1:10)
      {
      eval('B_'+num2str(i)+'=A(i,1);');
      }

Viewing 1 reply thread
  • You must be logged in to reply to this topic.