Navigation

Operators and Keywords

Function List:

C++ API

 Unpack a vector into different variables under the control of a mask.

 [var1, var2, ...] = statevector_unpack(s,x)
 [var1, var2, ...] = statevector_unpack(s,x,fillvalue)

 Unpack the vector x into the different variables var1, var2, ...

 Input:
   s: structure generated by statevector_init.
   x: vector of the packed elements. The size of this vector is the number of elements equal to 1
     in all masks.

 Optional input parameter:
   fillvalue: The value to fill in var1, var2,... where the masks correspond to a land grid point. The default is zero.

 Output:
   var1, var2,...: unpacked variables.

 Notes:
 If x is a matrix, then the second dimension is assumed 
 to represent the different ensemble members. In this case,
 var1, var2, ... have also an additional trailing dimension.

Package: divand