FRED可与
Matlab Excel接口,并可支持VB脚本语言
编程。
bj"z8 kP jxy1 FRED can act as an OLE automation server, which means that FRED canbe run remotely from other applications such as Microsoft Visual Basic,Microsoft Excel, Matlab, or any other application that can act as anOLE/Automation client. In this configuration, FRED is the automation serverand the application which is controlling FRED is the automation client. Thefollowing information describes the fundamentals of how to run FRED as anautomation server.
kd;'}x=5yP 下面是FRED原厂photon engineering与Matlab并行使用的接口连接,有兴趣的可以看下
?An,-N-ezf o&^NwgRCF FRED Automation with Matlab
l_v*7d XKq@]=\F Using FRED’s COM interface it is possible to exchange data with external programs such as MATLAB and Excel. This article presents an example where FRED and MATLAB are used respectively as the automation client and server in order to exchange data and create plots. There are a few steps that should be taken both in FRED and MATLAB before executing your script:
%{STz In MATLAB:
[[qwaI Start an instance of MATLAB
MB*u-N0v Execute the command: enableservice(‘AutomationServer’,true)
Isovwd Execute the command: enableservice(‘AutomationServer’)
D{AFL.r{ In FRED:
'Kis hXOn] Right mouse click in the script editor and choose: Edit > References
vS M_]fn Choose the Matlab Type Library
"E>t,
D Dimension your Matlab object in the script as type MLApp.MLApp
:HW>9nD. The above steps will ensure that 1) FRED uses the current instance of MATLAB as the server instead of the command console, and 2) FRED loads the Matlab type library and can recognize and execute the server’s application commands. In general, it is not necessary to load the Matlab type library in FRED since the Matlab server can be generically defined as an Object.
m{&w{3pQk `Lz1{#F2G The example enbedded script in the sample file with this article demonstrates how to use some of the following Matlab application commands:
7<yp"5><) PutWorkspaceData: send real-valued data to Matlab
i=8UBryr'e PutFullMatrix: send complex-valued data to Matlab
'8r8%XI GetWorkspaceData: retrieve data from Matlab
V:\]cGA{ Execute: issue Matlab commands to the server for execution
M}!A]@ F14(;'Az 链接:
http://fred-kb.photonengr.com/2011/08/16/fred-automation-with-matlab/