DADiSP / MATLINK
MATLAB Code Execution Module
MATLINK provides a simple interface for executing MATLAB (1) code directly from DADiSP. Any MATLAB function or script can be processed just as if it were a native DADiSP function.
No need to rewrite code or manipulate temporary data files. MATLINK combines the functionality of existing MATLAB programs with the ease and power of the DADiSP Worksheet environment.
Series, arrays, scalars and strings are exchanged seamlessly. Series and array results returned from MATLAB plot automatically in DADiSP. MATLAB code embedded into a Worksheet Window formula is hot linked and automatically re-executes when the Window updates.
- Seamless execution of MATLAB dode from DADiSP.
- Runs built-in and custom MATLAB functions or scripts.
- Avoid code rewrites, use any MATLAB program as is.
- Supports expression evaluation in normal MATLAB syntax.
- Freely mix DADiSP functions and MATLAB code.
- Automatic visualisation of series and array results.
- Bi-directional exchange of program variables.
- Handles both real and complex data.
- Supports scalar and string data types.
- Supports MATLAB Version 4.0 and higher.
(1) MATLAB is a registered trademark of The MathWorks, Inc.
MATLAB code execution module
MATLINK runs MATLAB programs directly from DADiSP and exchanges data between DADiSP and MATLAB. Both built-in and custom MATLAB functions or scripts are executed just as if they were native DADiSP functions. Arrays, scalar and string data are exchanged transparently in fast binary format using the ActiveX Automation interfaces of DADiSP and MATLAB.
How does it work?
The key to the simplicity and power of MATLINK resides in the MATLAB Object created by DADiSP. The MATLAB Object supports the execution of any MATLAB expression from the MATLAB environment and returns the results to DADiSP via ActiveX. Because the code is still run in MATLAB the results are exactly the same as would normally be produced by MATLAB.
ML Dot Syntax
The default name of the MATLAB Object is ml. Simply preface the original MATLAB function name with ml. to run any MATLAB code from DADiSP. For example, the following DADiSP command displays the current version of the available MATLAB release:
The returned version text is displayed by DADiSP. Because the connection to MATLAB is automatically established when the MATLAB Object is first invoked, explicit initialisation is not required.
Mix and match
DADiSP and MATLAB functions can be combined and used interchangeably within a Worksheet or SPL functions. For example:
W1: gnorm(10000, 1) W2: ml.diff(W1)
W1 contains 1000 samples of Gaussian distributed random noise. The data is then processed by the MATLAB diff function and displayed in W2. When W1 changes, W2 automatically updates and the new data is processed by MATLAB.
The MATLAB diff function executes just like any other DADiSP function except:
1. DADiSP sends the required data to MATLAB
2. MATLAB executes the function
3. The results are returned to DADiSP.
The entire process is perfomed automatically, transparently and efficiently.
DADiSP and MATLAB functions can be freely mixed. For example:
W1: gnorm(10000, 1) W2: movavg(ml.diff(w1), 10)
The MATLAB diff function is applied to the data in W1 and the result is smoothed by means of a 10 point moving average computed by the DADiSP movavg function. Any combination of DADiSP and MATLAB functions can be combined in this manner.
Although generally not required, MATLINK supports explicit data exchange between DADiSP and MATLAB variables. For example:
// assign a DADiSP series to a MATLAB variable ml.MatVar = 1..100; // return a MATLAB variable to DADiSP and process x = 10 * ml.MatVar;
The MATLAB variable MatVar is created and assigned a series of values from 1 to 100. The DADiSP variable x contains the value of the MATLAB variable multiplied by 10. Though required data transfers are automatically handled by the MATLAB Object, the “dot syntax” provides a natural method for exchanging program variables when desired.
MATLAB command prompt
MATLAB expressions in original MATLAB syntax are evaluated directly by using the > prompt.
W1: >1:100 W2: integ(W1)
W1 contains the values 1 through 100 as produced by the MATLAB expression 1:100. W2 integrates the data. Again, a change to W1 automatically updates W2.
Although the equivalent data in W1 can be generated natively by DADiSP with the statement 1..100, the expression 1:100 is standard MATLAB syntax. Any expression in standard MATLAB syntax is supported and evaluated when the expression is prefaced by the > prompt.
The mlhelp function displays the original help text for MATLAB functions. For example:
The standard help information for the MATLAB eig function is displayed in DADiSP.
The mldoc function displays the online documentation for MATLAB functions. For example:
The online documentation for the MATLAB fft function is displayed in DADiSP.
Multiple return values from MATLAB functions is supported.
W1: rand(10) W2: (v, d) = ml.eig(W1);d
The MATLAB eig function returns two arrays. The second array, a diagonal matrix of eigenvalues, is placed and dislayed in W2.
Error messages or warnings produced by MATLAB are displayed in DADiSP. Functions that produce textual results are presented in a pop-up dialogue box. For example, to display a list of currently available MATLAB variables with corresponding data types:
MATLINK requires a licensed copy of MATLAB Version 4.0 or higher to be available from the machine running DADiSP.
DADiSP 6.5 B01 or higher is also required. Contact us for information about updating your current version of DADiSP.
|mldoc||Display MATLAB online help.|
|mleval||Evaluate a MATLAB function with optional arguments.|
|mlexec||Execute an expression in MATLAB syntax.|
|mlget||Get data from a MATLAB variable.|
|mlhelp||Display help text on a MATLAB function.|
|mlinit||Initialses the connection with MATLAB and creates a MATLAB Object.|
|mlput||Put data to a MATLAB variable.|
|mlshow||Shows or hides the current MATLAB Automation server.|
Melden Sie sich kostenlos an
- Produktnews, Support und Updates
- Online-Webinare und Live-Expertenschulungen
- Tipps und Tricks, um Ihre Software optimal zu nutzen
Hier geht es weiter
Wir können Ihnen dieses Produkt zur Zeit leider nicht anbieten.
Bitte kontaktieren Sie uns für weitere Informationen. Wir beraten und unterstützen Sie gerne.
Sie möchten kaufen?
Was sagen unsere Kunden über uns?
I have always received excellent support with Bibliographic software from your team. Thanks a lot.AM, London, UK
Amazing, wish I had learned about Endnote 5 years ago
[Bob] gave excellent unbiased information
I have had a very helpful response, and have passed it on to my Oxford colleagues with success. I am impressed with the way Adept seems to maintain the same staff for many years, which speaks very well for the organisation.HG, Oxford, UK