Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
when i wanna get the solution of multiplying two matrix, i can use a
worksheet function. worksheetfunction.mmult(MarixA, MatrixB) but how can i get the solution of multiplying a number and a matrix without using a user-defined function? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can insert the following code:
newMatrix = MatrixA For i = LBound(NewMatrix) To UBound(NewMatrix) For j = LBound(NewMatrix, 2) To UBound(NewMatrix, 2) newMatrix(i, j) = 3 * NewMatrix(i, j) Next Next or you can put essentially identical code in a Function Function DoNotCallMeUDF(iArray) newMatrix = iArray For i = LBound(newMatrix) To UBound(newMatrix) For j = LBound(newMatrix, 2) To UBound(newMatrix, 2) newMatrix(i, j) = 3 * newMatrix(i, j) Next Next DoNotCallMeUDF = newMatrix End Function and code newMatrix = DoNotCallMeUDF(MatrixA) Why the prohibition on the latter??? Alan Beban infshare wrote: when i wanna get the solution of multiplying two matrix, i can use a worksheet function. worksheetfunction.mmult(MarixA, MatrixB) but how can i get the solution of multiplying a number and a matrix without using a user-defined function? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Highlighting Operating Hours | Charts and Charting in Excel | |||
operating notepad from VBA | Excel Programming | |||
Find out Operating System | Excel Programming | |||
Operating system | Excel Programming | |||
Operating system | Excel Programming |