%composite trapezoid nodes
%inputs: a,b : endpoints of interval
%        n : number of nodes
% brad nelson 2/5/12

function [x,w]=ct_nodes(a,b,n)
x=linspace(a,b,n+1)'; %sets up equally-spaced points on [0,1]
%w=((zeros(1,n+1)+.5)+wextend(1,'zpd',zeros(1,n-1)+0.5,1))/(n+1); %weights
w=(zeros(1,n+1)+1); w(1)=0.5; w(n+1)=0.5;
w=w/(n+1);%weights