function [contrasts]=rri_mkhelmert(cond,sub)
% function [contrasts]=rri_mkhelmert(cond,sub)
% Creates Helmert contrasts
% Written 17-Feb-97 by RC
%
% cond = number of conditions
% sub = number of subjects
% modified by ARM to add normalization step

cont=cond-1;
hem=ones(cont,cond)*(-1);
for r=1:cont
	hem(r,r)=cont+1-r;
	if r>1
		hem(r,1:r-1)=zeros(1,r-1);
	end
end
hem=hem';
contrasts=zeros(1,cont);
for c=1:cond
	for s=1:sub
		contrasts=[contrasts;hem(c,:)];
	end
end
contrasts(1,:)=[];

contrasts=rri_normalize(contrasts);

