Ansys Learning Forum Forums Discuss Simulation Photonics readdata script not working in Lumerical 2024 R2.3 Reply To: readdata script not working in Lumerical 2024 R2.3

johannes.haataja
Subscriber

 

Much obliged Kirill for your help, 
  I don’t know why I get different behavious. I’ve replicated the issue on Lumerical 2024 R2.2 and R2.3 on two different Ubuntu systems.

Manipulating elements of M inside Lumerical to have 

 

0  3.2e-06  
1  2.8e+10  
2  410000  
3  3.3 

 

then using write function

 

write('writetest.txt',num2str(M),'overwrite');
M2 = readdata('writetest.txt');
?M2;
result: 
0  3  
1  2  
2  410000  
3  3


Perhaps as temporary solution, I'll multiply the values of my data file by some large enough prefactor and then divide M by the same prefactor to get the desired outcome.