function A = ssmatr2 % Simon and Sturm matrices for fractional pixels. % This version seems to work. % % by D. Holmgren, Mar 23 94. holmgren@phobos.astro.uwo.ca nl = input('Dimension of matrix '); pk = input('RV in pixels '); A = zeros(nl,nl); I = fix(pk); f = pk - I; for i = 1:nl for j = 1:nl if i == j + I if pk >= 0. A(i,j) = 1.-f; A(i,j+1) = f; elseif pk < 0. A(i,j-1) = 1.+f; A(i,j) = -f; end end end end