Search
Categories
Documents
Math::Matlab - An abstract base class for a simple Matlab API. (Displayed) README
|
Math::Matlab - An abstract base class for a simple Matlab API.
Math::Matlab - An abstract base class for a simple Matlab API.
If MyMatlab is a sub-class of Math::Matlab ...
use MyMatlab;
$matlab = MyMatlab->new( { %args } );
my $code = q/fprintf( 'Hello world!\n' );/
if ( $matlab->execute($code) ) {
print $matlab->fetch_result;
} else {
print $matlab->err_msg;
}
Math::Matlab is an abstract class for a simple interface to Matlab, a
mathematical computation package from The MathWorks (for more info on
Matlab, see http://www.mathworks.com/).
- execute
-
$success = $matlab->execute($matlab_code, @args)
-
An abstract method which executes the Matlab code passed in the first
argument and returns true if successful. The handling of any additional
arguments are determined by the implementing sub-class. The output of
the Matlab code is stored in the object to be retreived by one of the
following 4 methods. The Matlab code must print all output to STDOUT.
- get_result
-
$str = $matlab->get_result
$str = $matlab->get_result( $str )
-
Returns the Matlab output after stripping the extra junk.
- fetch_result
-
$str = $matlab->fetch_result
$str = $matlab->fetch_result( $str )
-
Returns the Matlab output after stripping the extra junk, then deletes
it from memory.
- get_raw_result
-
$str = $matlab->get_raw_result
$str = $matlab->get_raw_result( $str )
-
Returns the Matlab output in raw form. Can be helpful for debugging
errors.
- fetch_raw_result
-
$str = $matlab->fetch_raw_result
$str = $matlab->fetch_raw_result( $str )
-
Returns the Matlab output in raw form, then deletes it from memory. Can
be helpful for debugging errors.
- err_msg
-
$str = $matlab->err_msg
$str = $matlab->err_msg( $str )
-
Returns the most recent error message. Or sets the message to be
returned.
- _getset
-
$value = $object->_getset($field) ## get a field's value
$value = $object->_getset($field, $value) ## set a field's value
-
A utility method used to get or set a field in the object.
Copyright (c) 2002 PSERC. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Ray Zimmerman, <rz10@cornell.edu>
perl(1), Math::Matlab::Local, Math::Matlab::Remote, Math::Matlab::Server
Information
|
This site is currently in testing, it is not yet operating using the full database. Until it is officially launched you may wish to visit Help-Site Computer Manuals. After launch, this site (HelpSpy) will replace Help-Site. Information about the spider which is currently trawling the Internet looking for links to add to this directory can be found here. |
|