This file contains the Matlab code that appears in the paper: Gradient Projection Algorithms and Software for Arbitrary Rotation Criteria in Factor Analysis. by Coen A. Bernaards and Robert I. Jennrich Website: http://www.stat.ucla.edu/research -------------------------------------------------------------- What follows is the general GPF subroutine for orthogonal rotation. This is use without change. -------------------------------------------------------------- function [Lh,Th,table]=GPForth(A,T) al=1; L=A*T; [f,Gq]=vgQ(L); G=A'*Gq; table=[] for iter=0:500 M=T'*G; S=(M+M')/2; Gp=G-T*S; s=norm(Gp,'fro'); table=[table;iter f log10(s) al]; if s<10^(-5),break,end al=2*al; for i=0:10 X=T-al*Gp; [U,D,V]=svd(X,0); Tt=U*V'; L=A*Tt; [ft,Gq]=vgQ(L); if ft