figure('Units','normalized', ...
    'Name','BOUNDARIES', ...
	'Color',[0.8 0.8 0.8], ...
	'Position',[ 0.01375 0.40166 0.13 0.52 ]);
clor=[0.964705882352941 0.647058823529412 0.305882352941176];
width1= .6;
%scores
uicontrol('Units','normalized', ...
	'BackgroundColor',clor, ...
	'Callback','[loadings,percvar,scores,fscores,CI_loadings,CI_percvar]= discrim(x,g,2);figure;plotgrps(scores(:,1),scores(:,2),g);title(''SCORES (PC2 vs PC1)'')',...
	'Position',[0.156521739130435 0.803664921465969 width1 0.120418848167539 ], ...
	'String','scores');

%loadings,percvar,scores,fscores,CI_loadings,CI_percvar]
%               = discrim(X,grps,{ndf},{loadtype},{Xf},{norescale},{iter},{CI_level})	

%loadings
uicontrol('Units','normalized', ...
	'BackgroundColor',clor, ...
	'Callback','[loadings,percvar,scores,fscores,CI_loadings,CI_percvar]= discrim(x,g,2);figure;vectplot(loadings);title(''LOADINGS (CORRELATIONS OF CHARS WITH DISCRIM2 VS DISCRIM1'')',...
	'Position',[ 0.165217391304348 0.659685863874346 width1 0.120418848167539 ], ...
	'String','loadings');
%CI
uicontrol('Units','normalized', ...
	'BackgroundColor',clor, ...
   'Position',[ 0.165217391304348 0.520942408376963 width1 0.117801047120419 ], ...
   'Callback','[loadings,percvar,scores,fscores,CI_loadings,CI_percvar]=discrim(x,g,2,[],[],[],50);figure;vectplot(loadings(:,1),{},CI_loadings(:,[1 2]));title(''BOOTSTRAP LOADINGS ON DISCRIM1'')', ...
	'String','Boot loadings');
%CI
uicontrol('Units','normalized', ...
	'BackgroundColor',clor, ...
   'Position',[ 0.156521739130435 0.37434554973822 width1 0.117801047120419 ], ...  
	'Callback','[loadings,percvar,scores,fscores,CI_loadings,CI_percvar]=discrim(x,g,2,[],[],[],30);figure;vectplot((percvar(:,1)/100),{},(CI_percvar(:,[1 2])/100));title(''BOOTSTRAP EIGENVALUES ON DISCRIM1'')', ...
	'String','Boot percvar');

uicontrol('Units','normalized', ...
	'BackgroundColor',clor, ...
	'Position',[ 0.156521739130435 0.230366492146597 width1 0.117801047120419 ], ...
   'Callback','[D] = sqrt(mahal(x,g))',...
   'String','mahal');
%classify
uicontrol('Units','normalized', ...
	'BackgroundColor',clor, ...
	'Position',[ 0.165217391304348 0.0863874345549738 width1 0.117801047120419 ], ...
	'Callback',' [means,stderr,gids] = means(x,g);[euc] = eucl(means)',...
   'String','eucl');
