$ trying to write procedure in pops to get uvsub to take smodel values onto a residual for each day of observations $ residual= residual for each day the array was working...a,b,c,d proc(resid) SCALAR resid,I,b1,b2,x1,x2,x3,x4,x5,y1,y2,y3,y4,y5,f1,f2,f3,f4,f5 x1=0.140 y1=-0.350 f1=0.0002968 x2=0.5600 y2=-0.140 f2=0.0002293 x3=0.070 y3=-0.280 f3=0.0001722 x4=0.070 y4=-0.350 f4=0.0001339 x5=0.490 y5=-0.210 f5=0.0000501 resid=4505 task 'uvsub'; cmethod 'dft';cmodel '';factor 0;smodel(4)=1; $adding array cc's to the model I=1 for I=1 to 25; $ original text $ if I=1-8;b1=0.2;b2=0.2;end; $ if I=8-17;b1=0.7;b2=0.6;end; $ if I=18-24;b1=2.5;b2=2.1;end; $ if I=25;b1=7.8;b2=6.6;end; b1 = 0.2; b2 = 0.2 if (i > 8) then; b1=0.7;b2=0.6; end if (i > 17) then; b1=2.5;b2=2.1; end if (i = 25) then; b1=7.8;b2=6.6; end getn resid; smodel(1)=-f(I) smodel(2)=x(I) smodel(3)=y(I) smodel(5)=b1 smodel(6)=b2 go UVSUB resid=resid+1; wait; end return;finish