% Call: ft_pst.m % Calculation of the splitting-signal, or image-signal % which is generated by the frequency (p,s) in the % tensor representation of the image A of size NxM % where N=M>1 is an arbitrary integer. % % Dr. Artyom Grigoryan, 1996 (modified 2009) function B=ft_pst(A,p,s) [M N]=size(A); B=zeros(1,N); ks=0; for m=1:M t=ks; for n=1:N if t>=N t=t-N; end; t1=t+1; B(t1)=B(t1)+A(m,n); t=t+p; end; ks=ks+s; if ks>=M ks=ks-M; end; end; % B=B/N;