Question: how to use VBA customize function to solve matrix multiplication by using ubound Use loops to create a matrix multiplication. Sub vecMatMult() Function MyMatMult(vec, mat)

how to use VBA customize function to solve matrix multiplication by using ubound how to use VBA customize function to solve matrix multiplication by using

Use loops to create a matrix multiplication. Sub vecMatMult() Function MyMatMult(vec, mat) 'Rnd is a random draw from 0 to 1 ' m= Round ( Rnd 5,0)+1 ' n=Round(Rnd5,0)+1 '> ' ReDimmat(m,n) As Integer ReDim vec(m) As Integer n= ubound(vec, 1) redim out(n) as double For i=0 To m MyMatMult =0 For j=0 To n mat(i,j)=i3+j+1 End Function Next j Next i ' Notice the use of ubound to discover the size of the vector. 'Notice the use of ubound to discover ths size of the matrix. For i=0 To m vec(i)=i+1 Next i out = MyMatMult(vec, mat) End Sub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!