09/16/2010, 08:00 PM
(09/16/2010, 01:18 AM)nuninho1980 Wrote:(09/15/2010, 07:17 PM)mike3 Wrote: It should take any real or complex value. "PP" is not set, that should be the period (note in my post I mentioned "PP = 128*I"), in this case 128*I. This is what is causing your problem.
Though I don't think this'll work with just 3 elements and such a huge period because there won't be enough "resolution" in the Fourier series for it to home in on the function. You should either increase the elements or decrease the PP, say 8*I instead. If you want to use 128*I, try at least 81 (3^4) terms, but even there a smaller PP like 32*I would be best. Usually I use 128*I with at least 243 terms.
(I just tried it. 3 terms at 128*I is not enough.)
- vt = ConvToFourier(vector(3^4, i, 1))
- vt = NormTetIter(32*I, 2., vt)
- TetApprox(32*I, vt, 2., 0.5) -> 1.636671277861037786181970844 + ...I
2^^0.5 = 1.63667 - it's incorrect but yes 2^^0.5 = 1.45878181603642 (new knesser code by sheldonison)
Try running NormTetIter a few more times over it. Like
for(i=1,5,vt = NormTetIter(32*I, 2., vt));

