Assignment:
ω=2πf
t = n/256 (t goes from 0 to 1 in increments of 1/256)
x(t)= cos ωt frequency= 2Hz
y(t)= cos ωt frequency= 16Hz
When you need to find the dot product of two vectors x and y which will be equivalent to the inner product of the two functions x(t) and y(t):
then use xy = x*y’ in MATLAB
This operation is equivalent to the matrix operation xyT, in which each element of x is multiplied by each element of y and the products are summed. The resultant value xy is a scalar. The corresponding inner product for x(t) and y(t) is
{x(t), y(t)} = ∫ x(t)y*(t)dt, integral span between -∞ and ∞.
This corresponds roughly to the dot product when you think of the integration as a summation of sampled functions. The integration limits will depend upon extent of support of the functions x(t) and y(t), i.e., the integral will cover those times when both functions are non-zero.
(1) What is the value for xy?
(2) Are the two arrays x and y orthogonal?
(3) Are the two corresponding functions {x(t) and y(t)} orthogonal?
(4) Compute x(t) and y(t) using the above formula
(5) Find a function x1(t) which is orthogonal to x(t) and has the same frequency as x(t). Create the corresponding MATLAB array x1 and verify computationally (in MATLAB) that x1 is orthogonal to x.