tensor product computation.

mathman21's picture

 Hi.I would like to ask how I can compute a tensor product between two matrices.I insert the tensor product operator between the two matrices but the evaluation exports the simple product between the two matrices.

Thanks in advance.

John MacKendrick's picture

The interface does not

The interface does not directly allow for this, but you can use the Define MuPAD name function to access MuPAD's linalg::kroneckerProduct function, which computes the tensor product between two matrices. This can be done as follows:

1. Choose Compute, Definitions, Define MuPAD Name.

2. Enter


as the MuPAD Name.

3. Enter


As the Scientific WorkPlace name. You can name the function anything you want. It is only important that the argument list matches what was entered in step 2.

4. Make sure  "That is built in to MuPAD or is automatically loaded" is checked and click OK.

Now if you toggle to math and enter f(A,B) where A and B are matrices and evaluate, the tensor product of A and B will be returned.

mathman21's picture

Thank you very much.

Thank you very much.