cdf2rdf
Convert complex diagonal form to real block diagonal form
Description
[
transforms the outputs of Vnew
,Dnew
] = cdf2rdf(V
,D
)[V,D] = eig(X)
or [V,D] =
eigs(X,___)
for real matrices X
from complex diagonal form to
real diagonal form. This operation transforms how the eigenvalues of X
are expressed in D
, and transforms V
such that
X*Vnew = Vnew*Dnew
.
In complex diagonal form,
D
is a diagonal matrix with complex conjugate pairs of eigenvalues on the main diagonal:Some of the eigenvalues along the diagonal might be real, but complex conjugate eigenvalue pairs are assumed to be next to one another.
In real diagonal form,
Dnew
has real eigenvalues on the diagonal, and complex eigenvalues are expressed as 2-by-2 real blocks along the main diagonal:
Examples
Transform Complex Diagonal Matrix into Real Block Diagonal Matrix
Calculate the eigenvalues and eigenvectors of a real matrix, and then transform the complex conjugate eigenvalue pairs into real blocks.
Find the eigenvalues and eigenvectors of a real matrix.
X = [1 1 1 1 1 0 4 5 1 1 0 -5 4 1 1 0 0 2 3 1 0 0 -3 -2 1]; [V,D] = eig(X)
V = 5×5 complex
1.0000 + 0.0000i -0.0179 - 0.1351i -0.0179 + 0.1351i 0.1593 - 0.4031i 0.1593 + 0.4031i
0.0000 + 0.0000i 0.0130 - 0.6214i 0.0130 + 0.6214i 0.0704 - 0.0267i 0.0704 + 0.0267i
0.0000 + 0.0000i 0.6363 + 0.0000i 0.6363 + 0.0000i -0.1261 + 0.1032i -0.1261 - 0.1032i
0.0000 + 0.0000i 0.1045 - 0.2087i 0.1045 + 0.2087i -0.2279 - 0.4161i -0.2279 + 0.4161i
0.0000 + 0.0000i -0.1156 + 0.3497i -0.1156 - 0.3497i 0.7449 + 0.0000i 0.7449 + 0.0000i
D = 5×5 complex
1.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 3.8801 + 5.1046i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 3.8801 - 5.1046i 0.0000 + 0.0000i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 2.1199 + 0.7018i 0.0000 + 0.0000i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 2.1199 - 0.7018i
D
contains one real eigenvalue and two pairs of complex conjugate eigenvalues.
Transform V
and D
so that Dnew
is in real block diagonal form and Vnew
satisfies X*Vnew = Vnew*Dnew
[Vnew,Dnew] = cdf2rdf(V,D)
Vnew = 5×5
1.0000 -0.0253 -0.1911 0.2253 -0.5701
0 0.0184 -0.8789 0.0996 -0.0378
0 0.8999 0 -0.1784 0.1459
0 0.1478 -0.2951 -0.3222 -0.5885
0 -0.1634 0.4946 1.0534 0
Dnew = 5×5
1.0000 0 0 0 0
0 3.8801 5.1046 0 0
0 -5.1046 3.8801 0 0
0 0 0 2.1199 0.7018
0 0 0 -0.7018 2.1199
Dnew
still has the real eigenvalue, but the complex conjugate eigenvalues are replaced with 2-by-2 blocks.
Input Arguments
V
— Right eigenvector matrix
matrix
Right eigenvector matrix, specified as the matrix returned by [V,D] =
eig(X)
or [V,D] = eigs(X,___)
.
Data Types: single
| double
Complex Number Support: Yes
D
— Diagonal eigenvalue matrix
matrix
Diagonal eigenvalue matrix, specified as the matrix returned by [V,D] =
eig(X)
or [V,D] = eigs(X,___)
. Some of the eigenvalues
along the diagonal of D
might be real, but complex conjugate
eigenvalue pairs are assumed to be next to one another.
Since eigs
returns a subset of the eigenvalues and
eigenvectors, the requested number of eigenvalues might include half of a complex
conjugate pair. cdf2rdf
returns an error if the
D
input contains incomplete complex conjugate pairs.
Data Types: single
| double
Complex Number Support: Yes
Output Arguments
Vnew
— Transformed right eigenvector matrix
matrix
Transformed right eigenvector matrix, returned as a matrix. The eigenvectors in
V
are transformed so that X*Vnew = Vnew*Dnew
holds. If the input eigenvector matrix V
is unitary, then
Vnew
is as well. After the transformation, the individual columns
of Vnew
are no longer eigenvectors of X
, but each
pair of vectors in Vnew
associated with a 2-by-2 block in
Dnew
spans the corresponding invariant vectors.
Dnew
— Transformed diagonal eigenvalue matrix
matrix
Transformed diagonal eigenvalue matrix, returned as a block diagonal real matrix.
Complex conjugate eigenvalue pairs in D
are replaced with 2-by-2 real
blocks along the diagonal in Dnew
.
Extended Capabilities
Thread-Based Environment
Run code in the background using MATLAB® backgroundPool
or accelerate code with Parallel Computing Toolbox™ ThreadPool
.
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
GPU Arrays
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced before R2006aR2021a: Improved algorithm to reduce round-off error
The algorithm for all input matrices has been improved to reduce floating-point round-off errors in the calculation.
Abrir ejemplo
Tiene una versión modificada de este ejemplo. ¿Desea abrir este ejemplo con sus modificaciones?
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)