function [qx,qw] = qs(p, x, w) start=1+p*(p+1)/2; qx = x(start:start+p); qw = w(start:start+p); end