Luna Moon

328 Reputation

3 Badges

14 years, 310 days

MaplePrimes Activity


These are questions asked by Luna Moon

Fourier transform of a non-integrable function ... Dear all, I am working on Fourier Transform of a non-integrable function. And I am working on the numerical implementation of the FT, using FFT. Let's call this function F(v). One example is F(v)=-1/(5*i*v)*(1-exp(5*i*v)) The function has a 1/v term in its asymptotic expansion, which corresponds to a jump or Heaviside function in its transform. Using FFT, I can see the jump, with some overshooting after the jump and undershooting before the jump, along with some ripples. I want to reduce these artifacts as much as possible, because I am going to integrate this transform against other functions later. Hence obtaining a smooth function without much numerical artifacts is vital. How do I do that?
Is this thing called Interval Math? Can Maple do it? Is this thing called Interval Math? Can Maple do it? I am not about if this is called Interval Analysis. The thing in my mind is that I know my Monte Carlo simulation yields a result with an error tolerance of 1e-5. And I wrap that MC simulation component into a more complicated expression and form a function, I want to know the error bound of the whole function involving the MC component. Can Maple do this? The same applies to analysis about round-off error. If I know a sub-expression has a round-off error of 1e-6, what should the error of the main expression involving this sub-expression be?
For trivial expressions, we don't need automatic code generation. For complicated expressions, code generator creates lots of temporary variables and the performance is not far from optimal. Once I generated a C program using codegen with 500+ temporary variables and I put that function into a numerical integral as an integrand. The result was very unstable - the integrals are often NaNs. On the other hand, I also convert Maple expression manually into C program which has exactly the same functionality. The result was correct, no NaNs in the integrals at all. So what's the use o
How do I programmatically save the output of "C" code generation to a "cpp" file? I am doing all of these in Matlab via the Maple engine, which is version 10, I guess. I cannot seem to do "writeto" redirection here, because Matlab doesn't allow that I guess. And I like to use "fprintf" because it gives me more control of the code that is generated... If it works, I no longer need copy and paste.. But it didn't work at all. There was no error message, but the file was empty... Can anybody tell me why? Thanks! -------------------- fd:=fopen("trygenC.cpp", WRITE, TEXT)
bb:=proc(aa, n) add(add(aa[j][k], j=0 .. 5), k=0 .. n) end proc cc:=prep2trans(bb) dd:=C(cc, optimized) ??? Error using ==> maple at 129 Error, (in codegen/C) Unable to translate this subscript into C aa[i2][i1] -------------- I don't understand...
1 2 3 4 5 Page 1 of 5