May be there is some mex/similar code available that uses vectorized implementation of fft/ifft, which I am unaware of. However, this is what I recently tried and definetly improved the speed of array processing: 1. Write a mex-c code to do the for-loops involving array processing. 2. Declare 1D arrays/pointers to store and process your data array; store and process the elements in a row/column-major (this can your choice as long as this data is not exchanged with matlab, I mean like the data storage for intermediate processing; if any data is received or sent to matlab environment, it needs to be in column major format)fashion; In matlab I guess any 2D/3D data array is stored in column major way (which means all the elements of the first column stored first, in order, followed by subsequent columns. For eg: given an array A of size m X n, to access element A (i, j), a typical c-code would look like A[i + j * m], where m is the number of rows and i-the row, j-the colmn. id of the array A you would want to access. 3. I guess this is done implicitly everytime when a piece of matlab code is written to access an array element A(i,j); So, I guess the idea of vectorizing seems to me like going more towards the way the data is stored internally (1D fashion) and avoiding this dereferencing made by matlab for every access to the array. This is just my opinion; but made sense to me to believe so. There are lots of simple tutorials available for writing mex-c code. Hope this helps. Madhu. --- In , "smruti savarkar" <smruti_savarkar@h...> wrote: > hello everyone, > > i am performing fft,ifft & nested for loops on 21x1985 matrix. it is taking > a lot of time. is there any function that i can use to do it faster. i'v > heard of something called vectorization but couldnt find it anywhere. This > is very urgent . > > thank u > > _________________________________________________________________ > Buzz on your screen! Download on your screen. > http://www.msn.co.in/Download/screensaver/ Keep yourself smiling! |