help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] FFT : transform halfcomplex ro complex


From: 森 拓晃
Subject: [Help-gsl] FFT : transform halfcomplex ro complex
Date: Wed, 30 Jan 2013 20:05:55 +0900

Hello everyone.

I can't convert half complex data to complex data  .
Please let me know,please.



I started to use GSL ,and I am having a problem with fft.
I try to use gsl_fft_halfcomplex_unpack() to transform half_complex data to 
complex data like

========================================
 const int size=8;
  double data[size]={4,3,7,9,1,0,0,0};
  gsl_complex_packed_array  complex_coefficient[8];

  gsl_fft_real_wavetable* real_wavetable=gsl_fft_real_wavetable_alloc(size);
  gsl_fft_real_workspace*  real_workspace=gsl_fft_real_workspace_alloc(size);

  gsl_fft_real_transform(data,1,size,real_wavetable,real_workspace);
  gsl_fft_halfcomplex_unpack(data,complex_coefficient,1,size);

======================================================  
but  this code is wrong ,and message says 
"can't convert to double** to double* for argument 2"
,so next I changed this code as ..

gsl_complex_packed_array complex_coefficient;

and 


gsl_fft_halfcomplex_unpack(data,complex_coefficient,1,size); 

and succeeded to compile, but when I try to get real or complex data as,

cout<<complex_coefficient.real<<endl;  


massage says "request for member ‘real’ in ‘complex_coefficient[i]’, which is 
of non-class type ‘double*’".

Oh my god….



==============================
        森 拓晃
        address@hidden
        090-7746-0713
==============================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]