How to Create Function for Matrix Multiplication

lehrymut14

New Member
Joined
May 21, 2017
Messages
1
Hi,

I have some problem with function of MMULT in excel.
I want to do sample two matrix multiplication by MMULT function.
X matrix at a given interval and k is a function that multiplies the matrix for the value of the number.


Many thanks for your help.


Example: Selected cells in the range A1 and C3, and Let k be the value of 3 (k=3).


=MatrixMultiply(A1:C3;3) -->> will give result




Function MatrixMultiply(X As Range, k As Integer) As Variant
.
.
.
End Function
‘---------------------------
‘Sample Use
‘-----------------------
Sub Test()
.
.
.
End Sub
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
For scalar multiplication of a matrix:
If you have a matrix at A1:C3 and a number at G1, then select A5:C8, type =G1*A1:C3 into the formula bar. Press Ctrl-Shift-Enter and the product will be shown.

There is no need for a UDF.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,215,509
Messages
6,125,216
Members
449,215
Latest member
texmansru47

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top