Using nested loops to solve kronecker product
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Wei Hern
 el 8 de Dic. de 2013
  
    
    
    
    
    Comentada: sixwwwwww
      
 el 9 de Dic. de 2013
            dear all, my question is how do solve kronecker's product of a 10x10 matrix or any matrix size using nested loops rather than the conventional Kron function.
for eg,
aa=round(rand(10,10)*10-5)
bb=round(rand(10,10)*20-10)
what do i write in the script to solve the multiplication of aa*bb using kroneckers rule.
thanks!
0 comentarios
Respuesta aceptada
  sixwwwwww
      
 el 8 de Dic. de 2013
        
      Editada: sixwwwwww
      
 el 8 de Dic. de 2013
  
      you can do it as follows(if you have square matrices of same size):
A = round(rand(10,10)*10-5);
B = round(rand(10,10)*20-10);
for i = 1:size(A, 1)
  for j = 1:size(A, 2)
      AB{i, j} = A(i, j) * B;
  end
end
AB = cell2mat(AB);
disp(AB)
Good luck!
4 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Multidimensional Arrays en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

