Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

3. Where is the job to be accomplished?

Answered: 1 week ago

Question

=+professionalism and competency in handling global HR issues?

Answered: 1 week ago