Dear Sir I have a question and I hope if you can answer me. I have tow one dimensional sequence or matrix., The first sequence is called M with length 511 number: M[511]={ 1, 1, 1, 1, 1, 1, 1,-1,-1,1,1,-1,-1,1,-1,-1,-1,1?????..}; And the second sequence is called with nine numbers S [9] = {1, 1, 1,-1,-1, 1,-1,-1,-1}; I want to 1- Multiplied the sequences S with first ninth number of the sequence M, and keep the result as A0, 2- The multiplication procedure as flows The first number of M * the first number of S, if the answer is negative => (-1), and if the answer is positive => 1 Example: M= {1, 1, 1, 1, 1, 1, 1,-1,-1}; /*(first ninth number of M sequence)*/ S= {1, 1, 1,-1,-1, 1,-1,-1,-1}; 1*1=1 1*1=1 1*1=1 1*-1=-1 1*-1=-1 1*1=1 1*-1=-1 -1*-1=1 -1*-1=1 The answer is 3= (6*1- (3*-1)) 3-shift the sequence M on number to the right and multiplied the sequence S by the M sequence (from number 2-10). And keep the multiplication result in A1, repeat the procedure of the multiplication till the end of the sequence M. 4- Calculate the maximum value multiplication result A0, A1, A2? sorry since my language is not so good thank you _________________________________________________________________ Join the world s largest e-mail service with MSN Hotmail. http://www.hotmail.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.