-
-
December 13, 2022 at 11:19 am
-
December 13, 2022 at 6:32 pm
Guilin Sun
Ansys EmployeeSince there are several variables, it can be challenge to directly give a solution. What I can suggest is, online 35, please use
?kern; ?length(J);
I guess the length of J and V is less than kern, then kern+1 is out of the matrix range.
-
December 13, 2022 at 6:50 pm
-
December 13, 2022 at 7:07 pm
Guilin Sun
Ansys EmployeeSorry, you did not write those two:
?kern; ?length(J);
it will output the value of "kern" and the length of the J matrix.
If you use kern=length(J) then the next script will be definitely wrong, as you can not get J(kern+1) since its size is "kern".
Please try again.
-
December 13, 2022 at 7:23 pm
-
December 13, 2022 at 8:00 pm
Guilin Sun
Ansys EmployeePerhaps you are not familiar to scripting. The question mark is to output the data. You did not provide the data from the bottom of the script file, so no further suggestion is available. Maybe you can check if J has negative values. If not, then
kern=0 so J(kern) will fail.
On the other hand, you should not use kern=length(kern) since kern should be one value, scalar, not a matrix. Please delete line 34. and check the result.
Please note that line 37 is to cacualte the matrix difference. If the matrix fails, or the denominator is zero, line 37 will fail.
Please watch some script videos once this issue is solved. https://optics.ansys.com/hc/en-us/sections/360007813714-SCRIPTING100-List-of-videos
kern
-
December 13, 2022 at 8:10 pm
Iqrar Hussain
SubscriberSir Thank you for your guidance
I appreciate your effort.
-
- You must be logged in to reply to this topic.

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
- Ansys Insight: Convergence issues in CHARGE
- Is there a Lumerical script command to output the Simulation and Memory requirements?
-
2582
-
2080
-
1303
-
1106
-
459
© 2023 Copyright ANSYS, Inc. All rights reserved.