mpa_pole_residual Subroutine

public subroutine mpa_pole_residual(np, n, w, x, xmax, E, r, cost)

The residues are eliminated with a linear least squares fit (mpa_R_fit, variable projection). The residual is normalized to xmax and returned as real and imaginary parts.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: np

np: Half of the number of frequencies; n: Number of poles

integer, intent(in) :: n

np: Half of the number of frequencies; n: Number of poles

complex(kind=DP), intent(in) :: w(2*np)

w: Frequencies; E: Pole positions

complex(kind=DP), intent(in) :: x(2*np)

w: Frequencies; E: Pole positions

real(kind=DP), intent(in) :: xmax

Normalization of the residual

complex(kind=DP), intent(in) :: E(np)

w: Frequencies; E: Pole positions

real(kind=DP), intent(out) :: r(4*np)

r: Residual (real parts followed by imaginary parts); cost: Sum of the squared residuals

real(kind=DP), intent(out) :: cost

r: Residual (real parts followed by imaginary parts); cost: Sum of the squared residuals



📚 Documentation Pages
⏱️ Real-Time
🔗 Code API