wecopttool.WEC.vec_to_dofmat

WEC.vec_to_dofmat(vec)[source]

Convert a vector to a matrix with one column per degree of freedom.

Opposite of wecopttool.WEC.dofmat_to_vec().

Calls wecopttool.vec_to_dofmat() with the appropriate inputs for the WEC object.

Examples

>>> x_wec, x_opt = wec.decompose_state(x)
>>> x_wec_mat = wec.vec_to_dofmat(x_wec)
Parameters:

vec (ndarray) – One-dimensional vector.

Return type:

ndarray