Photonics

Photonics

Topics related to Lumerical and more

How to correct error messages

    • Maimuna Nagey
      Subscriber

      I get this error message "lsf line 17: in expression A(i,...) = B the indices of A were out of range" when running this line of codes;

       

      #loop over 8 equal intervals

      phase_PB_v = matrix(1,8);

      for (i =1:8){

      switchtolayout;

      select("TiO2_unitcell");

      set("first axis", "Z");

      set("rotation 1",(i-1)*180/7);

      run;

      Ex = getdata("phase", "Ex");

      Ey = getdata("phase", "Ey");

      E_L = Ex - 1i*Ey;

      phase_PB_v(1,i) = unwrap(angle(E_L));

      }

      n = linspace(1,8,8);

      plot(n,(phase_PB_v - phase_PB_v(1,1))*180/pi, "n", "phase", "phase scan");

      I intend to calculate the phase with each angle of rotation of the unit cell.

       

       

       

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