- Put the code in a function
- Set a conditional, not(isreal(Y)), breakpoint on the line
- Run the function and you will see that eventually Y is complex
- Set a conditional, not(isreal(TSilnew)), breakpoint on the line
- Run the function and you'll see that TSilnew(1) is set to a complex value for kt=56. You have a negative value raised to 1/4.