r
    steps=linspace(1/2,v(j),2*v(j));    %coupon payment and maturity (i.e. cash-flow) dates
    p=(1+interp1(get(sm,'simTenor'),R(:,:,i)',steps)')...
      .^(-kron(steps,ones(get(sm,'simT')*get(sm,'simN'),1)));   %zero rates for each cash-flow date
    c(:,j,i)=((1-p(:,end))./sum(p')')*2;    %compute par coupon rate from zero rates, and convert to annual
  end
end

##### SOURCE END #####
--></body></html>