Numerical Recipes Forum  

Go Back   Numerical Recipes Forum > Obsolete Editions Forum > Methods: Chapters 12 and 13

Thread Tools Display Modes
Old 01-06-2005, 05:50 AM
Viviana Viviana is offline
Join Date: Jan 2005
Posts: 1

Hallo everybody

I'm new in this forum.. I'm trying to use fft in more than one dimensions but I have some problems... Can someone help me?
This is my code to make a two dimension fft to a matrix of 4 rows and 4 colums, all elements equal 1. The result should be a matrix with all 0 except a 16. Isn't so? But I received something else... Where am I wrong?
int main(){
double *data;   
int i;   
unsigned long dim[2];    
data = (double *)malloc(2*N*N*sizeof(double));    
for (i=0; i<2*N*N; i++)  
 {     data[i]=1;     
     data[++i]=0;    }      
 fourn(data-1, dim-1, 2, 1);      
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 07:34 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.