Changes between Version 11 and Version 12 of MATLAB API
- Timestamp:
- 11/19/13 11:05:37 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MATLAB API
v11 v12 24 24 data = muscleReceive('exit', data_type) 25 25 }}} 26 == CxA == 27 All MATLAB kernels should use as their implementation `muscle.core.standalone.MatlabKernel`, e.g. 26 27 Due to mismatch between C and MATLAB datatypes, only a subset of the datatypes supported in the C API is available in the MATLAB API, namely: 28 * `MUSCLE_DOUBLE` - array of doubles 29 * `MUSCLE_STRING` - character string 30 * `MUSCLE_INT32` - array of integers 31 * `MUSCLE_BOOLEAN` - array of logicals 32 33 In the MUSCLE configuration file, kernels should use the `muscle.core.standalone.MatlabKernel` class or its subclass as their implementation, e.g., 28 34 {{{ 29 35 w = Instance.new('w', 'muscle.core.standalone.MatlabKernel') 30 36 }}} 31 == Supported !DataTypes == 32 Due to huge mismatch between the C and MATLAB datatypes only subset of datatypes supported in the C API is available in the MATLAB API, namely: 33 * MUSCLE_DOUBLE 34 * MUSCLE_STRING 35 * MUSCLE_INT32 36 * MUSCLE_BOOLEAN 37 37 38 == Example == 38 * sender.m 39 40 In the `src/matlab/examples/simplematlab` is an example of a kernel using the MATLAB API to send an array of doubles. This array is then received by the ConsoleWriter class, as specified in the configuration file `src/cxa/SimpleMatlabExample.cxa.rb`. 41 42 * The `sender.m` MATLAB script is as follows: 39 43 {{{ 40 44 … … 58 62 }}} 59 63 60 * example session:64 * And a session using this script outputs the following: 61 65 {{{ 62 66 Running both MUSCLE2 Simulation Manager and the Simulation … … 137 141 138 142 Executed in </scratch/41450320.batch.grid.cyf-kr.edu.pl/n1245-g7e.zeus_2013-11-15_15-32-58_8575> 139 140 141 143 }}}