SymTridiagonal

..  SymTridiagonal(d, du)

Construct a real symmetric tridiagonal matrix from the diagonal and upper diagonal, respectively. The result is of type ``SymTridiagonal`` and provides efficient specialized eigensolvers, but may be converted into a regular matrix with :func:`full`.

Examples

In the Julia programming language, the function SymTridiagonal(d, du) is used to construct a real symmetric tridiagonal matrix from the diagonal and upper diagonal elements. The resulting matrix is of type SymTridiagonal and provides efficient specialized eigensolvers. However, it can also be converted into a regular matrix using the full function.

julia> d = [1.0, 2.0, 3.0, 4.0];
julia> du = [2.0, 3.0, 4.0];
julia> matrix = SymTridiagonal(d, du)
4×4 SymTridiagonal{Float64,Array{Float64,1}}:
 1.0  2.0   ⋅    ⋅ 
 2.0  2.0  3.0   ⋅ 
  ⋅   3.0  3.0  4.0
  ⋅    ⋅   4.0  4.0

In this example, a symmetric tridiagonal matrix is created using the diagonal elements [1.0, 2.0, 3.0, 4.0] and the upper diagonal elements [2.0, 3.0, 4.0]. The resulting SymTridiagonal matrix matrix is displayed.

To convert the SymTridiagonal matrix into a regular matrix, you can use the full function:

julia> full_matrix = full(matrix)
4×4 Array{Float64,2}:
 1.0  2.0   0.0  0.0
 2.0  2.0  3.0   0.0
 0.0  3.0  3.0  4.0
 0.0  0.0  4.0  4.0

The full function converts the SymTridiagonal matrix matrix into a regular matrix full_matrix of type Array{Float64,2}.

Note: The SymTridiagonal function is typically used when working with large symmetric tridiagonal matrices where the structure can be exploited for efficient computations.

See Also

Ac_ldiv_B, Ac_ldiv_Bc, Ac_mul_B, Ac_mul_Bc, Ac_rdiv_B, Ac_rdiv_Bc, At_ldiv_B, At_ldiv_Bt, At_mul_B, At_mul_Bt, At_rdiv_B, At_rdiv_Bt, A_ldiv_Bc, A_ldiv_Bt, A_mul_B!, A_mul_Bc, A_mul_Bt, A_rdiv_Bc, A_rdiv_Bt, Bidiagonal, cond, conv2, det, diag, diagind, diagm, diff, eig, eigvals, eigvecs, expm, eye, full, inv, isdiag, ishermitian, isposdef, isposdef!, issym, istril, istriu, logabsdet, logdet, lyap, norm, qrfact, rank, repmat, rot180, rotl90, rotr90, sortrows, sqrtm, SymTridiagonal, trace, Tridiagonal, tril, tril!, triu, triu!, writedlm,

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: