Hi team,
I want to be able to import Zemax ZRD binary files into MATLAB. I tried fopen and fread but had no luck. I see examples of code for reading Zemax ZBF files on the File Exchange but nothing for ZRD files.
Please help.
Hi team,
I want to be able to import Zemax ZRD binary files into MATLAB. I tried fopen and fread but had no luck. I see examples of code for reading Zemax ZBF files on the File Exchange but nothing for ZRD files.
Please help.
Best answer by Ray
Hi Priscilla,
Having written such an importer many years ago, I would not advise you to do it, at least not the way I did. Zemax 22.2 introduced a way to save the ZRD content as text tab separated value files. This makes huge files but the loading is much simpler.
This knowledge base article also offers a solution with the API and a DLL:
If you still think you need to write such importer in Matlab, you may start from the python code below:
A few additional points:
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.