Search for question
Question

1 a= [1; 2; 3] + im 2 b = [4; 5; 6] + im 3 dot (a, b) 4 inner product (b, a) 4.2. Outer-product 5 error = abs(dot

(b, a) inner_product (a, b)) 6 println("Error equals Serror") ✓ Validate Error equals 0.0 The outer product takes as input a pair of vectors a EF and b = F", and returns as the output them x 12 matrix given by [a,b] ab abb [3; 4; 5] [5; 6; 7] 19 11 12 end abit Implement the outer product in the function below. for j in 1:n end a b end return op function outer_product (a:: AbstractVector, b::AbstractVector) m = length(a) n = length(b) op[i, j] = a[i]b[j] = Lambi ambi Run Verity Solution Revert outer product (oeneric function with 1 method) ... TIL *** op = Array (eltype (a)} (undef, m, n) # initialize an empty array of type given by a for i in 1:m ab ab Stale outputs 252ms am

Fig: 1