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 Kommentare

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.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

mryam alibeigi
mryam alibeigi am 7 Jun. 2013
Bearbeitet: mryam alibeigi am 7 Jun. 2013

0 Stimmen

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;

Weitere Antworten (2)

Matt J
Matt J am 2 Jun. 2013
Bearbeitet: Matt J am 2 Jun. 2013

0 Stimmen

Any matrix A+A' is Hermitian symmetric. That might be the basis for you to construct the matrix you want.

3 Kommentare

Is that ' the transpose or the conjugate transpose ?
Matt J
Matt J am 2 Jun. 2013
The conjugate transpose.
Matt J
Matt J am 4 Jun. 2013
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?

Melden Sie sich an, um zu kommentieren.

mryam alibeigi
mryam alibeigi am 4 Jun. 2013
Bearbeitet: Matt J am 4 Jun. 2013

0 Stimmen

Relocated to Comment by Matt J

Kategorien

Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by