TAGGED: export-data, matlab, post-processing-data, saving-data
-
-
January 31, 2023 at 7:46 am
Mehdi Heydari
SubscriberHi everyone,
I've run a multi level sweep in lumerical (on 3 different parameters)
and exported the data to matlab using script command:
matlabsave("P_TC2_Pol_1.0", P_TC2_Pol);
Problem is when you open the file in matlab you will see that this struct size stored in P:
It is a two dimention (x.331 and y.3019). It stored all the power data in one column!!!! any suggestion to save data properly?
-
January 31, 2023 at 10:29 am
Mehdi Heydari
SubscriberI used reshape function to solve the problem. but it would be nice if we could export the data in a reasonable way directly.
-
January 31, 2023 at 6:42 pm
Guilin Sun
Ansys EmployeeWe do not have control of matlab. You may check, verrify and confirm the dataset and the matrices in Lumerical script environment before saving to matlab data.
Please note that, there are some differences between Lumerical script and matlab. For example, FDTD uses auto non-uniform mesh, and the space varables xyz and E, H are non uniform. However if you directly send data to matlab, it will treat xyz in a uniform manner. eg, it recalculate x by linspace(min(x),max(x), length(x)), which creats uniform mesh.
Therefore, before sending data to any 3rd party tools, please make sure the data is in consistent with their definition.
-
- 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.
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- “Import optical generation” or “delta generation rate”?
- Error: addfdtd is not a valid function or a variable name
- Error on Lumerical device
- Using a license file on a new license server
- Ansys Insight: Transmission results greater than one
- Ansys Insight: Diverging Simulations
- Finding your Ansys (or Lumerical) account number
- Is there a Lumerical script command to output the Simulation and Memory requirements?
- Ansys Insight: Why my simulation result is different from published paper or experiment?
-
5268
-
3299
-
2469
-
1308
-
998
© 2023 Copyright ANSYS, Inc. All rights reserved.