Notes
- Starting with Lumerical 2024 R1, MATLAB Linux libraries are no longer packaged with the Lumerical Applications
- We still support MATLAB file load and save for versions 7 and greater
- See this KB for more information.
The Script Integration feature allows MATLAB commands to be typed directly into the Lumerical script prompt. This provides a very seamless way to take advantage of the full range of MATLAB functions.
Setup instructions and system requirements for the MATLAB script integration feature can be found in the online Knowledge Base. See the MATLAB integration setup section of the Installation Guide.The MATLAB interface functions (matlab, matlabput, matlabget) allow you to work primarily within the Lumerical script environment, but still have access to the full range of MATLAB functions when they are required. For information on supported versions of MATLAB, see the matlab script function description.
The first time one of these functions is called, it will start a MATLAB session and create a connection between the two applications. Once the connection is established, it is possible to transfer data from Lumerical to MATLAB (matlabput), transfer data from MATLAB to Lumerical (matlabget), and run MATLAB commands from the Lumerical script prompt (matlab).
For example, open usr_matlab.fsp, then run usr_matlab_optionA.lsf. A MATLAB session will be opened in the background. The MATLAB coutourf function is used to create a contour plot of the electric field intensity, as shown below. In addition to the contour plot, more advanced text formatting is possible, such as using the Greek letter Mu on the axis labels.