hed variables</span>
<span class="keyword">if</span> numel(X) ~= numel(oldX) || isempty(iK) ||  n ~= oldn || <span class="keyword">...</span>
    sum(any(X ~= oldX)) || sum(any(oldIn ~= input)) || <span class="keyword">...</span>
    sum(any(oldOut ~= target))
  oldX = X; oldIn = input; oldOut = target; oldn = n;
  K = zeros(n,n,E); iK = K; beta = zeros(n,E);

  <span class="keyword">for</span> i=1:E                                              <span class="comment">% compute K and inv(K)</span>
    inp = b