wcvec=[]; tEvec=[]; terrsvec=[]; for weightcost = .25:0.25:2.0 %%this tries a range of values for weightcost. %% You must decide the range to try. %% To specify values from 1 to 2 in steps of .1 %% you would type weightcost = 1:.1:2 restart=1; classbp2; wcvec=[wcvec, weightcost]; %this adds one entry to the array %% terrsvec=[terrsvec, terrors]; %% figure(13); clf; %% plot(wcvec', terrsvec'); %% title('terrs against weightcost'); tEvec=[tEvec, tE]; figure(12); clf; plot(wcvec', tEvec'); title(sprintf('Cross-entropy against weightcost with numhid= %3i', numhid)); drawnow; end;