how to make a hermitian symbolic matrix in matlan

hello I need to make a hermitian symmetric matrix with size L*L (2<L<20)
for example if L=2
A=[a c+1i*d; c-1i*d b] where a,b ,c and d are real symbol it seems too hard for large L... can any one help me? best regards maryam.

2 Commenti

Your diagonal elements must be real-valued for the matrix to be Hermitian; a+1i*b and e+1i*f would be incorrect unless b and f were zero.
thanks you are right I edit the question.

Accedi per commentare.

 Risposta accettata

mryam alibeigi
mryam alibeigi il 7 Giu 2013
Modificato: mryam alibeigi il 7 Giu 2013
hi every one I found how to make symbolic hermitian matrix myself. the code is written below . D is a hermitian Symbolic matrix with size(L*L).
A = sym('A%d%d', L); A = sym(A, 'real');
B = sym('B%d%d', L); B = sym(B, 'real');
for i=1:L for j=1:L if i>j A(i,j)=A(j,i); B(i,j)=-B(j,i); end if i==j B(i,j)=0; end end end
D=A+1i*B;

Più risposte (2)

Matt J
Matt J il 2 Giu 2013
Modificato: Matt J il 2 Giu 2013
Any matrix A+A' is Hermitian symmetric. That might be the basis for you to construct the matrix you want.

3 Commenti

Is that ' the transpose or the conjugate transpose ?
The conjugate transpose.
mryam alibeigi Commented:
you are right A+A' is hermitian symmetric but I want to make symbolic *hermitian matrix *.
how can I make symbolic hermitian matrix?

Accedi per commentare.

mryam alibeigi
mryam alibeigi il 4 Giu 2013
Modificato: Matt J il 4 Giu 2013
Relocated to Comment by Matt J

Categorie

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by