function matrix = vec2linearSymMat(w) matrix = [w(1),w(2),w(3),zeros(1,3);... 0,w(1),0,w(2),w(3),0;... 0,0,w(1),0,w(2),w(3)]; end