function Y3 = shiftf(X3,c) % Y3 = shiftf(X3,c) % X3 is matrix coefficients of % a polynomial P(x). % c is a number. % Result Y3 is coefficients of P(y+c) test=size(X3); if (size(test)<3) Y3 = X3; return end%if % Matlab automatically squeezes some results, so we stop here instead of % putting the rest of the function into an else clause. n=test(3); if (n == 1) Y3 = X3; else [Q3,V] = syndivf(X3,c); Y3=cat(3,shiftf(Q3,c),V); % build vector of remainders end%if end%function % Rutgers teaching code by R. T. Bumby