# Orthogonality using MATLAB

See attachment for full problem description.

w=2πf

t = n/256 (t goes from 0 to 1 in increments of 1/256)

x(t)= cos wt frequency= 2Hz

y(t)= cos wt 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

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.

https://brainmass.com/engineering/computer-engineering/orthogonality-matlab-119328

#### Solution Preview

Please see the attached file.

Matlab codes are attached in the .m file. You will need to have Matlab 7.0 to open it.

Otherwise, just copy the codes from the WORD file to your matlab editor.

ω=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 ...

#### Solution Summary

The solution investigates orthogonality using MATLAB. The solution is detailed and was rated '5/5' by the student who originally posted the questions.

Proving two signals are orthogonal using MATLAB

Suppose we had two functions:

(See attached)

How would you show that these two functions are orthogonal using MATLAB? Also, verify that these two functions are orthogonal analytically: i.e., sketch the functions, their product and find the integral of their product.

View Full Posting Details