function plot_centers(InpPat,Model) [m,n]=size(InpPat); if n==1 plot(InpPat); hold k=Model.Sub_Model.order+1; for i=1:Model.Sub_Model.int_knots plot(1:m,ones(1,m)*Model.Sub_Model.Knots(k),'--'); k=k+1; end xlabel('Pattern number') ylabel('InpPat, centers') end if n==2 plot(InpPat(:,1),InpPat(:,2),'o'); hold n_s_m=Model.n_s_m; for i=1:n_s_m if length(Model.Sub_Model(i).var)==2 x=Model.Sub_Model(i).order(1)+1; for j=1:Model.Sub_Model(i).int_knots(1) y=Model.Sub_Model(i).order(2)+1; for k=1:Model.Sub_Model(i).int_knots(2) plot(Model.Sub_Model(i).Knots(1,x),Model.Sub_Model(i).Knots(2,y),'*'); y=y+1; end x=x+1; end else if Model.Sub_Model(i).var==1 k=Model.Sub_Model(i).order+1; inc=(max(InpPat(:,2))-min(InpPat(:,2)))/(m-1); for j=1:Model.Sub_Model(i).int_knots plot(ones(1,m)*Model.Sub_Model(i).Knots(k),min(InpPat(:,2)):inc:max(InpPat(:,2)),'--'); k=k+1; end else k=Model.Sub_Model(i).order+1; inc=(max(InpPat(:,1))-min(InpPat(:,1)))/(m-1); for j=1:Model.Sub_Model(i).int_knots plot(min(InpPat(:,1)):inc:max(InpPat(:,1)),ones(1,m)*Model.Sub_Model(i).Knots(k),'--'); k=k+1; end end end end end xlabel('Input 1'); ylabel('Input 2'); hold