How to reduce running time of diagonal matrix multiplication with full matrix in Matlab?
    5 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
I need to calculate a matrix multiplication that 
, where B is a full matrix with 
 and D is a digonal matrix with 
.The computational complexity is 
Acturally, if the matrix D is a full matrix, the computational complexity will be 
.
I recorded the running time for both cases in matlab, and find that the running time and time complexity are not consistent, how can I speed it up? I want to use less time to calculate the first case compared with the second case.
Thanks.
2 commentaires
  Chunru
      
      
 le 28 Juil 2022
				The simplest case is for D=I.  Then 
.  The complexity for this matrix multiplication is 
 rather than 
.
For full matrix D, the complexity is  
.
For diagonal D, the complexity is 
.
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Operating on Diagonal 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!