how can i generate 100*12 unitary complex matrix in matlab. can anyone plese tell me
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MAMATHA YADAVALLI
le 18 Déc 2017
Réponse apportée : John D'Errico
le 18 Déc 2017
i take randomly but it is not satisfy the condition conjugate transpose of matrix is equal to its inverse. rng(10) a=randn(100,12)+1i*randn(100,12);
0 commentaires
Réponse acceptée
John D'Errico
le 18 Déc 2017
Works fine for me.
a=orth(randn(100,12)+1i*randn(100,12));
Note that I added a call to orth.
whos a
Name Size Bytes Class Attributes
a 100x12 19200 double complex
So a is 100x12, complex, an orthonormal basis set.
Some of what you said is nonsense though, since a 100x12 matrix has no inverse. So a can have NO inverse. At best, you can compute a'*a, and verify that is an approximate identity matrix.
norm(a'*a - eye(12))
ans =
2.2982e-15
As you can see, I did NOT check for exact equality here. Instead, compare the results, and verify the difference is small, on the order of floating point trash. NEVER compare for exact equality of floating point results.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!