MATLAB: I have a matrix q and i need the diagonal of qq’ matrix I have a 5×5 matrix q and i need to obtain the diagonal of qq' anyone know how to do this and what qq' is? Best Answer In your Help Navigator, search for "arithmetic operators" and "diag"diag(q*q')is the same asdiag(q*transpose(q))if all of the elements in q are real. Otherwise ' will give you the complex-conjugate transpose. Related SolutionsMATLAB: How to write Continue Long Statements on Multiple Lines Use repmat to avoid manually typing all 160 of those ‘%q’ repeats! Try this: formatSpec = ['%f',repmat('%q',1,160), '%[^\n\r]']; MATLAB: Dear friends, the long matlab command that I have written is error. I want to be spelled the same way but without error. Do it like the second example on this documentation page about continuing long statements on multiple lines. Related QuestionHow to compute only the matrix Q in QR factorization in MATLAB 7.10 (R2010a)Divide the shuffled sequence Q={Q1,Q2,Q3,···,Qm×n}. into MN/16 matrices which are 4×4. M=256 and N=256Access Diagonal Matrix ElementCholesky of a matrix with deleted rows and columns: chol(Q*A*Q’)
Best Answer