    function [pS,pSmap]=rfiaa_oct_c1(pX,K,q_i,eta,q_rec)
    % this fuction applies the recursive version of FIAA, RFIAA
    % pX => the uniformly reshaped interference spectrum
    % K => the length of the reconstruction grid in depth direction
    % q_i => the number of iterations
    % eta => a weighting of the noise matrix in R, default is 1
    % q_rec => the number of iteration of recursive s
    % pS <= the estimated a(m)
    [~,piN]=size(pX);
    pS=zeros(K,piN);
    pSmap=pS;
    [pS(:,1), PE, pSmap(:,1) ]= fiaa_oct_c1(pX(:,1),K,q_i,eta);
    pee=PE(q_i+1);
    for i=2:piN
      [pS(:,i), pee, pSmap(:,i)]= ...
          rec_fiaa_oct_c1(pX(:,i),K,q_rec,eta,abs(pS(:,i-1)).^2,pee);
%       rec_fiaa_oct(pX(:,i),K,q_rec,eta,abs(pS(:,i-1)),pee);
    end
   
    
   
    
    
    
