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

Please provide simulations for all matlab code required, DO NOT SIMPLY WRITE IT

ID: 2291910 • Letter: P

Question

Please provide simulations for all matlab code required, DO NOT SIMPLY WRITE IT OUT!!! It is all one part of a single problem, which is why I cannot post this in parts

Let N 64 denote the number of samples of the signal in time domain and frequency domain. For this length, generate the IDFT matrix W using MATLAB Let x be a time domain signal and let X denote its DFT. We have x - WX. Let X be a K-sparse signal with K-3. a vector X such that it has 3 non-zero coefficients. Assume the non zero coefficients are given by X(1)-2.X(3-5 and X(9)-12. Generate the tine domain signal using x -WX. Generate a 2N x 1 vector xp by concatenating the real and imaginary parts of x. Similarly, generate the 2N x N matrix Wp by concatenating the real and imaginary parts of W. Verify that xp -WpX. We wish to reconstruct X by taking only 5K -15 measurements of X. Observe that the number of measurements we are taking is much less than the length of the unknown signal X (which is 64 here). Let M denote a submatrix of Wp with 5K rows and 64 columns. The rows of M consist of 5K randomly picked rows from the matrix Wp. This can be done using the following sequence o f commands Let X'- MX denote the 5K measurements we take of the signal X. We find the sparse solution X of X by solving the 1 norm minimization problem minimize X subject to MX X' X 20 You may use the built-in MATLAB function linprog to solve this linear program. Verify that the optimal solution X of the linear program closely matches with the original signal X

Explanation / Answer

clc; clear all; close all;

X_freq = zeros(1,64); % Initialization

X_freq(1) = 2;

X_freq(3) = 5;

X_freq(9) = 12;

% IDFT Matrix

% Inverse Transform

x = W*X_freq;

xp = [real(x) imag(x)];

Wp = [real(W) imag(W)];

% Check

if xp == WpX_freq

disp('Confirmed');

else

disp('Not true');

M = randperm(2*N,15); % Random Permutation Matrix




%%%% Then Simply use linprog.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote