[R] Solving Yis[i] = a*cos((2*pi/T)*(times[i] - Tau)) + ...

2008-08-01 Thread Josué Polanco
Hi everybody, I am reading the Lomb paper (Lomb, 1976) and I found an interesting equation, and I wish to resolve it using R. I am wondering if anybody has a hint. The equation is: Yis[i] = a*cos((2*pi/T)*(Times[i] - Tau)) + b*sin((2*pi/T)*(Times[i] - Tau)) ... (1) Where T and Tau are

Re: [R] Solving Yis[i] = a*cos((2*pi/T)*(times[i] - Tau)) + ...

2008-08-01 Thread Hans W. Borchers
Treat it as an over-determined linear system, that is: A - cbind(cos((2*pi/T)*(Times - Tau)), sin((2*pi/T)*(Times - Tau))) qr.solve(A, Yis) because 'solve' will only handle square matrices. Hans W. Borchers Josué Polanco wrote: Hi everybody, I am reading the Lomb paper