-
-
August 27, 2022 at 2:37 pm
megan.obrien
SubscriberHi,
I have calculated and saved to a text file the data for both neffTM and neffTE for varying fill factor of a grating coupler. I want to load this data into another Lumerical script and use it for calculating the different pitch values required.
The lines of code I have used to load the textfile into the script is as follows:
M = readdata("textfile.txt");
And the data is then loaded as a [17,3] matrix called M into the script workspace. I need to access the 2nd and 3rd columns for the pitch calculations, as te 2nd column is the neffTM values and the 3rd column is the neffTE values.
However, I am failing to access them as it is. Can anyone help me out please?
-
August 29, 2022 at 5:12 pm
Guilin Sun
Ansys EmployeeHere is an intro about matrix https://optics.ansys.com/hc/en-us/articles/360034929613-matrix-Script-command
Since this is a 2D matrix, you can access it as
neffTM=M(n,2);
neffTE=M(n,3)
where n is the index for fill factor., eg, n=1
you have the first value of the fill factor M(1,1); and neffTM and neffTE are the correspodent neff for this fill factor.
Please try and compare your original data.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- “Import optical generation” or “delta generation rate”?
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- Error on Lumerical device
- Using a license file on a new license server
- Error: addfdtd is not a valid function or a variable name
- Ansys Insight: Diverging Simulations
- Ansys Insight: Transmission results greater than one
- Ansys Insight: About override mesh in FDTD: its use and settings
- Is there a Lumerical script command to output the Simulation and Memory requirements?
- Ansys Insight: Convergence issues in CHARGE
-
2706
-
2146
-
1357
-
1148
-
462
© 2023 Copyright ANSYS, Inc. All rights reserved.