(a) Write a function script, call it inner_prod, that uses a for loop to find the inner product…
(a) Write a function script, call it inner_prod, that uses a for loop to find the inner product A_dot_B of two vectors A and B with dimension 1 X N. The function input arguments must be A and B, and the function returns A_dot_B.
(b) Write a script to demonstrate the operation of your function where t = 0:T:T 0-T, T = T0/N sec, T0 = 2p=0 sec, A = cos(w0t) and B = cos(Kw0t) for K = 1, 2, and 5. You choose N and w0. For each K, what is A_dot_B? What do you think A_dot_B will be for any integer K 1?
(c) Repeat part (b) for B = sin(Kw0t).
(d) When the inner product of two vectors is zero, it is said that the vectors are orthogonal. Here, we find that this concept can be extended to functions, for example, cos(M0t) and cos(K0t), M K, are orthogonal functions over a period T0. What other sinusoidal functions are orthogonal over a period?