Hello,

I struggle with the multiplication of two matrices. I cannot plot any result of the new matrix.
Sub Matrix()

Dim TableEK As Range
Dim Size As Integer
Dim x As Integer
Dim y As Integer
Dim ArrW As Variant
Dim ArrWs As Variant
Dim ArrC As Variant

Set TableEK = ActiveSheet.ListObjects("ek").Range.Cells(1, 1)
Size = 4

ReDim ArrW(1 To Size, 1 To 1)
ReDim ArrC(1 To 1, 1 To Size)
ReDim ArrWs(1 To Size, 1 To 1)

For x = 1 To Size
    ArrW(x, 1) = Cells(TableEK.Row + x, TableEK.Column + Size + 1)
Next
        'MsgBox ArrW(1, 1)
        'MsgBox ArrW(2, 1)
        'MsgBox ArrW(3, 1)
        'MsgBox ArrW(4, 1)

For x = 1 To Size
    For y = 1 To Size
        ArrC(1, y) = Cells(TableEK.Row + x, TableEK.Column - 1 + y)
    Next
        'MsgBox ArrC(1, 1)
        'MsgBox ArrC(1, 2)
        'MsgBox ArrC(1, 3)
        'MsgBox ArrC(1, 4)


    ArrWs(x, 1) = Application.WorksheetFunction.MMult(ArrC, ArrW)
    MsgBox ArrWs(x, 1)  'here is the error!

Next
    'MsgBox ArrWs(1, 1)
    'MsgBox ArrWs(2, 1)
    'MsgBox ArrWs(3, 1)
    'MsgBox ArrWs(4, 1)

End Sub