How to write a 'horizontal direct product' (*~) from Gauss in Matlab?

Hi,
I am trying to write the 'horizontal direct product' (*~) from Gauss in Matlab. Anyone can help me?
E.g. Horizontal direct product z = x*~y;
x = [1 2; 3 4]; y = [5 6; 7 8];
z = [5 6 10 12; 21 24 28 32]
NB. The input matrices x and y must have the same number of rows. The result will have cols( x) * cols( y) columns.
Thanks!

 Respuesta aceptada

Más respuestas (2)

Walter Roberson
Walter Roberson el 18 de Ag. de 2012
That is a subset of the output of kron(x,y)

2 comentarios

Thanks, Walter. I noted that, but do you know how to extract this subset?
Row indexing, but I do not know what the general pattern is (I would need a few additional examples of different lengths to go on.)

Iniciar sesión para comentar.

Categorías

Más información sobre Numerical Integration and Differential Equations en Centro de ayuda y File Exchange.

Preguntada:

el 18 de Ag. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by