Title: Gedaes MATLAB Library
1Gedaes MATLAB Library
- William I. LundgrenGedae, Inc.Telephone 856
231 4458Fax 856 231 1403Email
gedae_at_gedae.comWebsite www.gedae.com
2Access to MATLAB through Gedae
- MATLAB code can be executed through a Gedae
function box - MATLABs libraries and user-written MATLAB
routines and applications can be accessed - Gedae data can be plotted using MATLABs plotting
routines like plot and mesh - MATLAB applications can be ported to embeddable
code piece by piece - Through Gedaes E-Solaris distributed computing
capability, MATLAB applications can be
distributed across workstations
3MATLABs eval Function
- MATLABs eval function allows the user to write a
string containing MATLAB code and then evaluate
that string - gtgt string pi 3
- gtgt eval(string)
- This code creates a variable pi and sets its
value to 3. - Gedaes MATLAB library works by allowing the user
to access this eval function. By setting a
string parameter Command on the function box, the
user specifies what MATLAB code to be run by the
function box
4Eval Function Boxes
Eval function boxes transfer data from the input
stream(s) to MATLAB, then call the eval function
with the supplied Command string, and then
transfer the data back to Gedae
5MATLAB Figures
MATLABs plotting routines can also be accessed,
again using an evaluated string to execute the
MATLAB code. The Hold parameter sets whether the
axis is to be cleared before a new plot is
generated
6MATLAB Terminal
- When developing an application using the Gedae
MATLAB library, it is useful to have a more
interactive means of communicating with the
MATLAB engine - Without interactive communication, programming,
and algorithmic errors would be hard to track
down - Because other MATLAB boxes are integrated into
the data flow, onetime commands like labeling a
figure or printing it would have to be forced
into Command strings where such commands might
not naturally fit - A Gedae GUI, Mlterminal, is provided to allow the
user to interactively query and communicate with
the MATLAB engine
7MATLAB Terminal (cont.)
Find values of variables
The Mlterminal is the only way to retrieve text
output from MATLAB function boxes. Enter
commands in the white text entry area and press
Run. The results appear in the pink area below.
Pressing Refresh retrieves text output from other
MATLAB function boxes
MATLABs whos
8Porting MATLAB Applications
- Porting MATLAB applications to embeddable code is
made easier by using the Gedae MATLAB library.
Example
Function B mySolve(A,C) Solve C A B where
B and C are n-by-m and A is n-by-n where B is
unknown. A_inv inv(A) B A_inv C
Run this code using the vm_mleval21 function box
9Porting MATLAB Applications (cont.)
- To turn the previous graph into embeddable code,
divide the algorithm into its two parts. Below
is a matrix inverse, then a matrix multiply
Then incrementally replace these boxes with
embeddable ones
10Distributed MATLAB
- The MATLAB library can be combined with Gedaes
E-Solaris capability - Graphs can be partitioned and mapped to a network
of workstations such that MATLAB boxes are on
different processors - Each E-Solaris processor spawns its own MATLAB
engine and can execute its own MATLAB code (MIMD) - Combining MATLAB with E-Solaris allows the user
to distribute MATLAB applications
11Distributed MATLAB (cont.)
Each family member on a separate processor
12Summary
- All MATLAB routines, including all the products
libraries and all user-written MATLAB code, can
be easily incorporated into a Gedae graph - MATLAB figures can be used to display Gedae data
- MATLAB applications can be more easily ported to
embeddable Gedae graphs by starting with the
whole application in one MATLAB box, then
breaking the application down, and incrementally
replacing MATLAB boxes with embeddable ones - Distributed MATLAB applications can be developed
by combining the MATLAB library with E-Solaris