[eigen] uniform spaced cpx sinusoid via rootfinding, was Re: FFT module thoughts |

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]

*To*: eigen@xxxxxxxxxxxxxxxxxxx*Subject*: [eigen] uniform spaced cpx sinusoid via rootfinding, was Re: FFT module thoughts*From*: Mark Borgerding <mark@xxxxxxxxxxxxxx>*Date*: Thu, 05 Apr 2012 11:55:50 -0400

The idea is similar to http://en.wikipedia.org/wiki/CORDIC

On 04/05/2012 11:02 AM, Pavel Holoborodko wrote:

Hi Mark.

[...]

I would really appreciate if you would provide some links on how to re-write make_twiddles using root finding approach.

clear all;close all; factors=[2 2 3 5]; n=prod(factors);% 60 theta=(2*pi*(0:(n-1))/n)'; y_desired = exp(j*theta); figure;plot(theta,[real(y_desired) imag(y_desired)] );legend('real','imag') % TODO: don't presume factors(1)==2, i.e. n is even y = [1 -1];% cexp(j0) cexp(jpi) for k=2:length(factors), fac = factors(k); nth_root = y(2)^( 1/fac); % Use root-finding here y_mult = [1 ]; raised = 1; for m=2:fac, raised = raised * nth_root; y_mult = [y_mult;raised]; end % inflate the vector by a factor of "fac" via outer product y = reshape( y_mult * y, 1,length(y)*fac ); end y=y(:); figure;plot(theta,[real(y) imag(y)] );legend('real','imag') rmse = norm(y_desired-y)/norm(y)

**Follow-Ups**:**Re: [eigen] uniform spaced cpx sinusoid via rootfinding, was Re: FFT module thoughts***From:*Pavel Holoborodko

**References**:**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Pavel Holoborodko

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Márton Danóczy

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Pavel Holoborodko

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Márton Danóczy

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Björn Piltz

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Pavel Holoborodko

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Mark Borgerding

**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW***From:*Pavel Holoborodko

**Messages sorted by:**[ date | thread ]- Prev by Date:
**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW** - Next by Date:
**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW** - Previous by thread:
**Re: FFT module thoughts, was Re: [eigen] Eigen 3.0.5 Could NOT find FFTW** - Next by thread:
**Re: [eigen] uniform spaced cpx sinusoid via rootfinding, was Re: FFT module thoughts**

Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |