Let a and b be two vectors of length n, i.e., a = [a], 22, ... , an], b = [61, 62, .. , bn]. Write a Matlab function tha
Posted: Fri May 20, 2022 4:31 pm
Let a and b be two vectors of length n, i.e., a = [a], 22, ... , an], b = [61, 62, .. , bn]. Write a Matlab function that compute the value v defined as n i W = -Σ3 Παρ. i=1 j=1 You function should begin with: function v=myValue(a,b) % input: a: vector % b: vector (same length as a) % output: v: the computed value Test it on the vectors a, b where ai =i, bi=i – 5, = i=1,2,...,10.