Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

digital image processing : Title: 2D DFT/FFT and its properties. 1) In MATLAB, w

ID: 3863896 • Letter: D

Question

digital image processing : Title: 2D DFT/FFT and its properties.

1) In MATLAB, write the function myDFT2 which takes as input a (complex) matrix X and outputs the 2D DFT of X: Y = myDFT2(X);

Your function should compute the 2D DFT by computing the 1D DFT along the rows and then along the columns (or vice-versa).

You should therefore also write the function myDFT which takes as input a vector and outputs the 1D DFT of the vector.

**have to use Input X = single(rand(2^i,1)) + j * single(rand(2^i,1)); where i = 1 to 16

possible solution:

Explanation / Answer

% Compute the value of the integrand at 2*pi/3.
x = 2*pi/3;
y = myIntegrand(x)

% Compute the area under the curve from 0 to pi.
xmin = 0;
xmax = pi;
f = @myIntegrand;
a = integral(f,xmin,xmax)

function y = myIntegrand(x)
y = sin(x).^3;
end