% FIGURE 5.3.3b
      function PHI = PHI(I,IDER,X)
      global LOCATE
%                              EVALUATE THE I-TH BASIS FUNCTION (IDER=0)
%                              OR ITS IDER-TH DERIVATIVE AT X
      [HORS,K] = LOCATE(I);
      PHI = HERM(HORS,K,IDER,X);
