wecopttool.time_mat

time_mat(f1, nfreq, nsubsteps=1, zero_freq=True)[source]

Assemble the time matrix that converts the state to a time-series.

For a state \(x\) consisting of the mean (DC) component followed by the real and imaginary components of the Fourier coefficients (excluding the imaginary component of the 2-point wave) as \(x=[X0, Re(X1), Im(X1), ..., Re(Xn)]\), the response vector in the time-domain (\(x(t)\)) is given as \(Mx\), where \(M\) is the time matrix.

The time matrix has size (nfreq*2, nfreq*2).

If zero_freq = False (not default), the mean (DC) component X0 is excluded, and the matrix/vector length is reduced by 1.

Parameters:
  • f1 (float) – Fundamental frequency f1 [\(Hz\)].

  • nfreq (int) – Number of frequencies.

  • nsubsteps (int | None) – Number of steps between the default (implied) time steps. A value of 1 corresponds to the default step length.

  • zero_freq (bool | None) – Whether the first frequency should be zero.

Return type:

ndarray