A Matlab command that will execute Lumerical script command(s) in an active Lumerical session opened via Matlab interoperability API.
Syntax |
Description |
---|---|
appevalscript(h,'scriptcommand'); |
Executes an arbitrary Lumerical script command in an active session h |
Example
The following Matlab code example opens FDTD as a client, loads an existing simulation file "MySimulation.fsp", runs the simulation, retrieves transmission from the monitor into Matlab workspace and closes FDTD.
path(path,'C:\Program Files\Lumerical\2020a\api\matlab'); %add Lumerical API path to Matlab; h=appopen('fdtd'); appevalscript(h,'load("MySimulation.fsp");'); appevalscript(h,'run;'); appevalscript(h,'T=transmission("monitor");'); appevalscript(h,'T=T.T;'); x=appgetvar(h,'T'); appclose(h);
See Also