Photonics

Photonics

Topics related to Lumerical and more

Window function generaion.

    • U Abinash Patro
      Subscriber

      I am having trouble in writing a script to create a circular window function to find power at a certain plane got using farfieldexact3d. I want the power only at the window. Please help me with some code snippet.

    • Guilin Sun
      Ansys Employee

      Once you have say (x,y), you can first create 2D matrix:

      X=meshgridx(x,y);

      Y=meshgridy(x,y);

      then create a circle:

      window=ones(length(x),length(y))&((X^2+Y^2)<=RR^2);

      image(x,y,window);

      with given radius RR.

      Please try.

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