09/15/2010, 07:17 PM
(09/15/2010, 01:28 PM)nuninho1980 Wrote:Code:(13:19) gp > vt = ConvToFourier(vector(3, i, 1))
%11 = [0.E-29 + 3.365806530 E-29*I, 1.000000000000000000000000000 + 0.E-29*I, 1.
051814540 E-29 + 2.524354897 E-29*I]
(13:19) gp > vt = NormTetIter(128*I, 2., vt)
%12 = [-0.7725460236329082906309061030 - 9.19165959 E-28*I, 0.769145726068130203
5432582902 - 5.202826184 E-28*I, 1.003400297564778087087647813 + 1.456791331 E-2
7*I]
(13:19) gp > TetApprox(PP, vt, 2., 0.5)
*** exp: negative exponent in gexp.
therefore, is this variable "x" integer only?
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.)

