matlab-ruby 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 2.0.1 / 2008-02-21
2
+
3
+ * 1 minor enhancement
4
+ * Added block usage to Matlab::Engine.new
5
+
1
6
  == 2.0.0 / 2008-01-03
2
7
 
3
8
  * 1 bug fix
data/README.txt CHANGED
@@ -28,6 +28,12 @@ A Ruby interface to the MATLAB interpreted language.
28
28
 
29
29
  engine.save "/tmp/20_x_400_matrix"
30
30
  engine.close
31
+
32
+ # May also use block syntax for new
33
+ Matlab::Engine.new do |engine|
34
+ engine.put_variable "x", 123.456
35
+ engine.get_variable "x"
36
+ end
31
37
 
32
38
  == REQUIREMENTS:
33
39
 
@@ -13,6 +13,12 @@ module Matlab
13
13
  # p engine.get_variable "z"
14
14
  #
15
15
  # engine.close
16
+ #
17
+ # # May also use block syntax for new
18
+ # Matlab::Engine.new do |engine|
19
+ # engine.put_variable "x", 123.456
20
+ # engine.get_variable "x"
21
+ # end
16
22
  #
17
23
  # Values are sent to and from MATLAB by calling a method on the
18
24
  # engine with the variable name of interest.
@@ -28,6 +34,14 @@ module Matlab
28
34
  load_driver(options[:driver])
29
35
 
30
36
  @handle = @driver.open(command)
37
+
38
+ if block_given?
39
+ begin
40
+ yield self
41
+ ensure
42
+ close
43
+ end
44
+ end
31
45
  end
32
46
 
33
47
  # Sends the given string to MATLAB to be evaluated
@@ -4,7 +4,7 @@ module Matlab
4
4
 
5
5
  MAJOR = 2
6
6
  MINOR = 0
7
- TINY = 0
7
+ TINY = 1
8
8
 
9
9
  STRING = [ MAJOR, MINOR, TINY ].join( "." )
10
10
  #:beta-tag:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matlab-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Younger
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-07 00:00:00 -07:00
12
+ date: 2008-02-21 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -19,9 +19,9 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.4.0
22
+ version: 1.5.0
23
23
  version:
24
- description: "== USAGE: require 'matlab' engine = Matlab::Engine.new engine.put_variable \"x\", 123.456 engine.put_variable \"y\", 789.101112 engine.eval \"z = x * y\" engine.get_variable \"z\" matrix = Matlab::Matrix.new(20, 400) 20.times { |m| 400.times { |n| matrix[m, n] = rand } } engine.put_variable \"m\", matrix engine.save \"/tmp/20_x_400_matrix\" engine.close == REQUIREMENTS: * MATLAB * GCC or some other compiler to build the included extension * SWIG (If you want to recompile the SWIG wrapper) * Mocha (For testing only)"
24
+ description: "== USAGE: require 'matlab' engine = Matlab::Engine.new engine.put_variable \"x\", 123.456 engine.put_variable \"y\", 789.101112 engine.eval \"z = x * y\" engine.get_variable \"z\" matrix = Matlab::Matrix.new(20, 400) 20.times { |m| 400.times { |n| matrix[m, n] = rand } } engine.put_variable \"m\", matrix engine.save \"/tmp/20_x_400_matrix\" engine.close # May also use block syntax for new Matlab::Engine.new do |engine| engine.put_variable \"x\", 123.456 engine.get_variable \"x\" end == REQUIREMENTS: * MATLAB * GCC or some other compiler to build the included extension * SWIG (If you want to recompile the SWIG wrapper) * Mocha (For testing only)"
25
25
  email:
26
26
  - jonathan.younger@lipomics.com
27
27
  executables: []