eigfact!

..  eigfact!(A, [B])

Same as :func:`eigfact`, but saves space by overwriting the input ``A`` (and
``B``), instead of creating a copy.

Examples

In the Julia programming language, the function eigfact!(A, [B]) is used to compute the eigenvalue factorization of a matrix A. It is similar to the eigfact function, but it saves space by overwriting the input matrix A (and optionally B), instead of creating a copy.

Here are some examples of how eigfact! can be used:

  1. Compute eigenvalue factorization of a matrix:

    julia> A = [1.0 2.0; 3.0 4.0];
    julia> eigfact!(A)
    Eigen{Float64,Float64,Array{Float64,2},Array{Float64,1}}
    evalues:
    2-element Array{Float64,1}:
    -0.3722813232690143
     5.372281323269014
    evectors:
    2×2 Array{Float64,2}:
    -0.824564  -0.415974
     0.565767  -0.909377

    This example computes the eigenvalue factorization of the matrix A and overwrites it with the result.

  2. Compute eigenvalue factorization with a right-hand side matrix:
    julia> A = [1.0 2.0; 3.0 4.0];
    julia> B = [5.0; 6.0];
    julia> eigfact!(A, B)
    Eigen{Float64,Float64,Array{Float64,2},Array{Float64,1}}
    evalues:
    2-element Array{Float64,1}:
    -0.3722813232690143
     5.372281323269014
    evectors:
    2×2 Array{Float64,2}:
    -0.824564  -0.415974
     0.565767  -0.909377

    This example computes the eigenvalue factorization of the matrix A and overwrites both A and B with the results.

Common mistake example:

julia> A = [1.0 2.0; 3.0 4.0];
julia> eigfact!(A, C)
ERROR: UndefVarError: C not defined

In this example, the variable C is not defined before passing it as the second argument to eigfact!. Ensure that all variables used in the function call are properly defined beforehand.

See Also

abs2, beta, binomial, ceil, cell, cross, ctranspose, ctranspose!, cummin, cumprod, cumprod!, cumsum, cumsum!, cumsum_kbn, div, divrem, eigfact, eigfact!, eigmin, eps, erf, erfc, erfcinv, erfcx, erfi, erfinv, exp, exp10, exp2, expm1, exponent, factor, factorial, factorize, floor, gcd, invmod, log, log10, log1p, log2, logspace, max, min, mod, mod1, modf, next, nextpow, nextprod, num, primes, primesmask, prod, realmin, sqrt, sum!, sumabs, sumabs!, sumabs2, sumabs2!,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field
Details

Checking you are not a robot: