aboutsummaryrefslogtreecommitdiff
path: root/Measurements/A_fhp.m
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2021-01-29 16:23:05 -0500
committerEugeniy E. Mikhailov <evgmik@gmail.com>2021-01-29 16:23:05 -0500
commit3983eb46023c1edd00617729ba929057fda8d0bd (patch)
tree816ad084f355000656c43da9160f1c257bbb1ddc /Measurements/A_fhp.m
downloadl1magic-3983eb46023c1edd00617729ba929057fda8d0bd.tar.gz
l1magic-3983eb46023c1edd00617729ba929057fda8d0bd.zip
Initial import from https://statweb.stanford.edu/~candes/software/l1magic/v1.11
Additional Clean up of Mac dirs and tex generated files
Diffstat (limited to 'Measurements/A_fhp.m')
-rw-r--r--Measurements/A_fhp.m25
1 files changed, 25 insertions, 0 deletions
diff --git a/Measurements/A_fhp.m b/Measurements/A_fhp.m
new file mode 100644
index 0000000..a7aef36
--- /dev/null
+++ b/Measurements/A_fhp.m
@@ -0,0 +1,25 @@
+% A_fhp.m
+%
+% Takes measurements in the upper half-plane of the 2D Fourier transform.
+%
+% Usage: b = A_fhp(x, OMEGA)
+%
+% x - N vector
+%
+% b - K vector = [mean; real part(OMEGA); imag part(OMEGA)]
+%
+% OMEGA - K/2-1 vector denoting which Fourier coefficients to use
+% (the real and imag parts of each freq are kept).
+%
+% Written by: Justin Romberg, Caltech
+% Created: October 2005
+% Email: jrom@acm.caltech.edu
+%
+
+function y = A_fhp(x, OMEGA)
+
+n = round(sqrt(length(x)));
+
+yc = 1/n*fft2(reshape(x,n,n));
+y = [yc(1,1); sqrt(2)*real(yc(OMEGA)); sqrt(2)*imag(yc(OMEGA))];
+