For a sequence of numbers x, how do I best create a function S(x, r, s) that computes sum(x[t]*x[t+r-s], where t ranges from s to length(x)-r+1 and r,s > 0.
For a sequence of numbers x, how do I best create a function S(x,
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might want to enforce a relationship between the length of x, and the values of s and r as well, or you can end up with some strange results. Try 6:1 for instance.