function [xp,w] = FEM3x3Gausspts ix = Q27index; a = sqrt(3/5); % three point rule xp = a*ix; % array of Gauss point coordinates in master element. ax = [5/9,8/9,5/9]'; go = ix+2; % turned into an index matrix acting on ax. w = ax(go(:,1)).*ax(go(:,2)).*ax(go(:,3)); % weights attached to gausspt.