From 3983eb46023c1edd00617729ba929057fda8d0bd Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Fri, 29 Jan 2021 16:23:05 -0500 Subject: Initial import from https://statweb.stanford.edu/~candes/software/l1magic/ Additional Clean up of Mac dirs and tex generated files --- Measurements/At_f.m | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Measurements/At_f.m (limited to 'Measurements/At_f.m') diff --git a/Measurements/At_f.m b/Measurements/At_f.m new file mode 100644 index 0000000..9addfe3 --- /dev/null +++ b/Measurements/At_f.m @@ -0,0 +1,32 @@ +% At_f.m +% +% Adjoint for "scrambled Fourier" measurements. +% +% Usage: x = At_f(b, N, OMEGA, P) +% +% b - K vector = [real part; imag part] +% +% N - length of output x +% +% OMEGA - K/2 vector denoting which Fourier coefficients to use +% (the real and imag parts of each freq are kept). +% +% P - Permutation to apply to the input vector. Fourier coeffs of +% x(P) are embedded. +% Default = 1:N (no scrambling). +% +% Written by: Justin Romberg, Caltech +% Created: October 2005 +% Email: jrom@acm.caltech.edu +% + + +function x = At_f(b, N, OMEGA, P) + +if (nargin < 4), P = 1:N; end + +K = length(b); +fx = zeros(N,1); +fx(OMEGA) = sqrt(2)*b(1:K/2) + i*sqrt(2)*b(K/2+1:K); +x = zeros(N,1); +x(P) = sqrt(N)*real(ifft(fx)); -- cgit v1.2.3