Important Functions

Top  Previous  Next

This section lists functions that the user may want to use in setting expressions for inputs and parameters when building a system and for values of run variables and values of system parameters.

 

To create a Vector<double>:

Function

Description

vectorDouble(int n, double val1, ...)

Create a Vector<double> of length "n" ≤ 10 with values val1, ... . The number of values must be equal n

vecD(int n, double val1, ...)

Create a Vector<double> of length "n" ≤ 10 with values val1, ... . The number of values must be equal n

ZeroVecD(int n)

Create a Vector<double> of length "n" having elements all set to zero.

OnesVecD(int n)

Create a Vector<double> of length "n" having elements all set to 1.

ConsVecD(int n, double d)

Create a Vector<double> of length "n" having elements all set to "d".

IndexVecD(int n, double val1, double increment)

Create a Vector<double> of length "n" having elements. The first element

has value "val1", the second "val1+increment" and so on.

PokeVecD(int n, int ind, double poke)

Create a Vector<double> of length "n" having elements. All elements are

equal to zero, except for the element "ind" which is equal to "poke".

TwoVecD(double d1, double d2)

Create a two-element Vector<double> having elements d1 and d2.

 

 

 

To create a Vector<int>:

Function

Description

vecI(int n, int val1, ...)

Create a Vector<int> of length "n" ≤ 10 with values val1, ... . The number of values must be equal n

ZeroVecI(int n)

Create a Vector<int> of length "n" having elements all set to zero.

OnesVecI(int n)

Create a Vector<int> of length "n" having elements all set to 1.

ConsVecI(int n, int d)

Create a Vector<int> of length "n" having elements all set to "d".

IndexVecI(int n, int val1, int increment)

Create a Vector<int> of length "n" having elements. The first element

has value "val1", the second "val1+increment" and so on.

PokeVecI(int n, int ind, int poke)

Create a Vector<int> of length "n" having elements. All elements are

equal to zero, except for the element "ind" which is equal to "poke".

 

 

To create a Vector<Complex>:

Function

Description

ZeroVecC(int n)

Create a Vector<Complex> of length "n" having elements all set to zero.

OnesVecC(int n)

Create a Vector<Complex> of length "n" having elements all set to 1.

ConsVecC(int n, double re, double im)

Create a Vector<Complex> of length "n" having elements all set to "(re, im)".

ConsVecC(int n, Complex c)

Create a Vector<Complex> of length "n" having elements all set to c

 

To create a Grid<Complex>:

Function

Description

ZeroGridC(int nxy, double dxy)

Create a Grid<Complex> on a grid which has sides of length "nxy" with spacing "dxy". The origin in both directions is at "nxy/2" point. The entire grid is set to (0, 0).

OnesGridC(int nxy, double dxy)

Create a Grid<Complex> on a grid which has sides of length "nxy" with spacing "dxy". The origin in both directions is at "nxy/2" point. The entire grid is set to (1, 0).

 

MATLAB Interface (mli) functions:

 

Function

Description

mliLoadD(const char* fn, const char* vn)

load from .mat file named "fn" value of variable named "vn"

mliLoadVD(const char* fn, const char* vn)

load from .mat file named "fn" value of vector variable named "vn"

mliLoadVDxD(const char* fn, const char* vn, double factor)

load from .mat file named "fn" value of vector variable named "vn" and multiply vector by factor

mliLoadGD(const char* fn, const char* vn)

load from .mat file named "fn" value of grid variable named "vn"

mliLoadGDxD(const char* fn, const char* vn, double factor)

load from .mat file named "fn" value of grid variable named "vn" and multiply grid by factor

 

 

other functions

ogrid_with_origin_on_mesh(nx,ny,dx,dy)

  the integers nx,ny are the mesh dimensions, and the floating-point constants dx, dy are the mesh spacings, in meters.

 

oGridGeometry(nx,ny,dx,dy)

  the integers nx,ny are the mesh dimensions, and the floating-point constants dx, dy are the mesh spacings, in meters.

 

ogrid_with_origin_on_mesh(nxy,dxy)

 integer nxy is the mesh dimension, in either x or y, and dxy is the mesh spacing in meters.

 

oGridGeometry(nxy,dxy)

 integer nxy is the mesh dimension, in either x or y, and dxy is the mesh spacing in meters.

 

oRectangularRegion(xmin,xmax,ymin,ymax)

 xmin, xmax, ymin, ymax - coordinates of the rectangular region.