how to program it?
Posted: Tue Aug 10, 2010 6:37 am
how to program it?
y has 20 observations y(1),y(2),y(3),y(4),......y(20) ,I want to extract the first 2 observations and get the maximum denoted x(2),then compute z(2)=x(2)-y(3),loop this ,first 3 observations,the maximum x(3),z(3)=x(3)-y(4),......first 19 obs,x(19),z(19)=x(19)-y(20)
and finally z(2) z(3)......z(19)form a new series z.
y has 20 observations y(1),y(2),y(3),y(4),......y(20) ,I want to extract the first 2 observations and get the maximum denoted x(2),then compute z(2)=x(2)-y(3),loop this ,first 3 observations,the maximum x(3),z(3)=x(3)-y(4),......first 19 obs,x(19),z(19)=x(19)-y(20)
and finally z(2) z(3)......z(19)form a new series z.