Reads or Writes a 1-dimensional array (vector) from MatLab


Read: Array = Lib.Data.Vector("Name" [, Imag] )

Write:  Lib.Data.Vector("Name" [, Imag] ) = Array


Array:  (Double) Array

Name: (String) The name of a MatLab variable

Imag:   (Boolean - optional) access the imaginary part of the array



VBA Example:  Write the array 'v' to the MatLab variable 'vec'.


Dim v(5) As Double

For i = 0 To 5

    v(i) = Rnd() * 10

Next i

Lib.Data.Vector("vec") = v





VBA Example:  Read the array 'v' from the MatLab variable 'vec'.


Dim v() As Double

v = Lib.Data.Vector("vec") = v