function [xp,w] = FEM3x3Lobatto ix = Q27index; a = 1; % three point rule xp = a*ix; % array of Gauss point coordinates in master element. ax = [1/3, 4/3, 1/3]'; 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.