Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalization of FFTW.r2r for FFTW.RODFT00 #268

Closed
almost6heads opened this issue Mar 17, 2023 · 1 comment
Closed

Normalization of FFTW.r2r for FFTW.RODFT00 #268

almost6heads opened this issue Mar 17, 2023 · 1 comment

Comments

@almost6heads
Copy link

I am confused about the r2r transform with odd symmetry. According to the FFTW manual, if I apply the RODFT00 transform to a unit vector of length 1, the result should be the vector [2]. But in Julia the commands u=ones(1,1) and v = FFTW.r2r(u,FFTW.RODFT00) gives the vector 4. Am I using this routine wrong?

@stevengj
Copy link
Member

stevengj commented Mar 17, 2023

With ones(1,1) you have a 2d array, so you did a 2d RODFT00 x RODFT00 transform, which multiplies by 2 twice. If you want a 1d vector of length 1, use ones(1). (If you want to transform just the columns of a 2d array, you can pass dims=1.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants