annotate NOTES @ 33:fc72b98aba8c

Fixed formatting of lambda expressions with multiple arguments. (Was producing 'Illegal Matlab expression (a,b)' error.)
author samer
date Tue, 25 Sep 2012 09:57:24 +0100
parents 0dd31a8c66bd
children 89688ebc447f
rev   line source
samer@0 1 *** Prolog Matlab interface
samer@0 2 ***
samer@0 3 *** Authors:
samer@0 4 *** Samer Abdallah
samer@0 5 *** Centre for Digital Music,
samer@0 6 *** Queen Mary, University of London
samer@0 7 ***
samer@0 8 *** Christophe Rhodes
samer@0 9 *** Centre for Computational Creativity
samer@0 10 *** Goldsmiths College, University of London
samer@0 11 ***
samer@0 12 *** Dec 2004--Nov 2006
samer@0 13
samer@0 14
samer@0 15 PLML is a foreign interface that enables Matlab to be used as a computational
samer@0 16 engine from within SWI Prolog. The basic idea is that instead of using
samer@0 17 the standard is/2 operator to evaluate a certain class of terms, we can
samer@0 18 use the ===/2 operator to get Matlab to evaluate a (much richer) class of
samer@0 19 terms, eg
samer@0 20
samer@0 21 ?- float(A)===trace(eye(3)).
samer@0 22
samer@0 23 A = 3.0
samer@0 24
samer@0 25 We can also get Matlab to perform actions with side effects, like
samer@0 26 making sounds and graphics; obviously these do not fit into the declartive
samer@0 27 semantics of Prolog and have to be dealt with under the procedural semantics.
samer@0 28 If you want to execute a Matlab command in an imperative way and see the
samer@0 29 textual output, use the ??/1 operator, eg
samer@0 30
samer@0 31 ?- ??disp(`hello).
samer@0 32
samer@0 33 >> hello
samer@0 34
samer@0 35
samer@0 36 The interface works by using the Matlab Engine API, which starts up a Matlab
samer@0 37 process on the end of a pipe. The Matlab process can be on another machine,
samer@0 38 and multiple Matlab engines can be started on the same or different machines.
samer@0 39 Matlab expressions are sent down the pipe and executed. Matlab's textual
samer@0 40 output comes back through the pipe. In addition, Matlab variables can be
samer@0 41 transferred directly between the Matlab engine's memory space and SWI's
samer@0 42 memory space.
samer@0 43
samer@0 44 See README for further details.
samer@0 45
samer@0 46
samer@0 47 RELEASE NOTES for version 0.2
samer@0 48
samer@0 49 - Added option to enable Matlab's JVM
samer@0 50 - Now closing Matlab engines properly at halt
samer@0 51 - Added support for valid but non-evaluable expressions
samer@0 52 - Fixed bug when returning integers from Matlab
samer@0 53 - Errors in user's Matlab functions now generate mlerror(_,_) expections
samer@0 54