f



Another Matlab fft2 != FFTW

Hello,

I have something strange...

There is a matrix of 5x5, padded with zeroes to 9x9:
Columns 1 through 7

   -0.1449   -0.0888    0.0095   -0.0816    0.1081         0         0
    0.0013   -0.1255   -0.0517   -0.0423    0.0090         0         0
   -0.0156    0.2098    0.2978   -0.1366   -0.1449         0         0
    0.0103    0.0943    0.0068    0.0311   -0.0550         0         0
    0.0711    0.0695   -0.0577    0.0572   -0.0314         0         0
         0         0         0         0         0         0         0
         0         0         0         0         0         0         0
         0         0         0         0         0         0         0
         0         0         0         0         0         0         0

  Columns 8 through 9

         0         0
         0         0
         0         0
         0         0
         0         0
         0         0
         0         0
         0         0
         0         0

In matlab, an fft2 yields the following:
 Columns 1 through 3

   0.0000             0.2733 - 0.1159i  -0.2439 - 0.4495i
  -0.4673 - 0.1859i  -0.6651 - 0.2544i  -0.6534 + 0.4118i
  -0.3924 + 0.2796i  -0.4806 + 0.5024i   0.3644 + 0.6977i
  -0.1653 + 0.2693i  -0.0195 + 0.3936i   0.5265 - 0.1896i
   0.1352 + 0.2382i   0.2658 + 0.0587i   0.0051 - 0.4679i
   0.1352 - 0.2382i  -0.1037 - 0.5388i  -0.5974 - 0.2733i
  -0.1653 - 0.2693i  -0.7101 - 0.2598i  -0.5318 + 0.5770i
  -0.3924 - 0.2796i  -0.7927 + 0.2416i   0.2980 + 0.5578i
  -0.4673 + 0.1859i  -0.2157 + 0.7054i   0.4214 - 0.1171i

  Columns 4 through 6

  -0.3748 + 0.1383i  -0.0044 + 0.1137i  -0.0044 - 0.1137i
  -0.2228 + 0.3993i   0.1978 + 0.4462i   0.2247 - 0.4734i
   0.3786 - 0.0615i   0.2339 - 0.1726i  -0.3105 - 0.3324i
  -0.3444 - 0.5698i  -0.2941 + 0.1250i   0.0202 - 0.0751i
  -0.5753 - 0.0160i  -0.0069 + 0.2812i  -0.0116 - 0.2485i
  -0.4691 + 0.2022i  -0.0116 + 0.2485i  -0.0069 - 0.2812i
   0.0517 + 0.3219i   0.0202 + 0.0751i  -0.2941 - 0.1250i
  -0.0253 - 0.4140i  -0.3105 + 0.3324i   0.2339 + 0.1726i
  -0.5867 - 0.0759i   0.2247 + 0.4734i   0.1978 - 0.4462i

  Columns 7 through 9

  -0.3748 - 0.1383i  -0.2439 + 0.4495i   0.2733 + 0.1159i
  -0.5867 + 0.0759i   0.4214 + 0.1171i  -0.2157 - 0.7054i
  -0.0253 + 0.4140i   0.2980 - 0.5578i  -0.7927 - 0.2416i
   0.0517 - 0.3219i  -0.5318 - 0.5770i  -0.7101 + 0.2598i
  -0.4691 - 0.2022i  -0.5974 + 0.2733i  -0.1037 + 0.5388i
  -0.5753 + 0.0160i   0.0051 + 0.4679i   0.2658 - 0.0587i
  -0.3444 + 0.5698i   0.5265 + 0.1896i  -0.0195 - 0.3936i
   0.3786 + 0.0615i   0.3644 - 0.6977i  -0.4806 - 0.5024i
  -0.2228 - 0.3993i  -0.6534 - 0.4118i  -0.6651 + 0.2544i

Now, I have following program:
#include <complex>
#include <iostream>
#include <fftw3.h>
#include <algorithm>

double data [81] = {
-0.144892,  -0.0888301,  0.00954482,  -0.0816278, 0.108072,
0,  0,  0,  0,
0.00130495,  -0.125482,  -0.0517049,  -0.0422596,  0.00901076,
0,  0,  0,  0,
-0.0155715,  0.209789,  0.297849,  -0.136606,  -0.144892,
0,  0,  0,  0,
0.010323,  0.0943392,  0.0067982,  0.0311058,  -0.0550466,
0,  0,  0,  0,
0.0710997,  0.069528,  -0.0577017,  0.0572293,  -0.0313799,
0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0,
0,  0,  0,  0,  0,  0,  0,  0,  0};


int main()
{
	double in [81];
	std::complex<double> out2d [81];

	fftw_plan p2d = fftw_plan_dft_r2c_2d(9, 9, in,
				(fftw_complex*)out2d,
					   FFTW_ESTIMATE);

	std::copy(data, data+81, in);

	for (int x = 0; x < 9; ++x)
	{
		for (int y = 0; y < 9; ++y)
			std::cout << in[9*x+y] << "   ";
		std::cout << std::endl;
	}
	std::cout << std::endl;

	fftw_execute(p2d);
	fftw_destroy_plan(p2d);

	for (int x = 0; x < 9; ++x)
	{
		for (int y = 0; y < 9; ++y)
			std::cout << out2d[9*x+y] << "   ";
		std::cout << std::endl;
	}
	std::cout << std::endl;

	return 0;
}

And compute the 2D FFT with it. Then the computed values are:
(-3.7e-07,0)   (0.273315,-0.115934)   (-0.243932,-0.449487)
(-0.374841,0.138284)   (-0.00435327,0.113728)   (-0.467347,-0.18594)
(-0.665096,-0.254414)   (-0.653422,0.411802)   (-0.222791,0.399276)
(0.197808,0.446171)   (-0.392351,0.279649)   (-0.480622,0.502412)
(0.364381,0.697738)   (0.37858,-0.0614555)   (0.233949,-0.172564)
(-0.16532,0.269268)   (-0.0194797,0.393635)   (0.526491,-0.189582)
(-0.344401,-0.569772)   (-0.29414,0.124964)   (0.135219,0.238206)
(0.265819,0.0586845)   (0.00508875,-0.46789)   (-0.575287,-0.0159722)
(-0.00689842,0.281154)   (0.135219,-0.238206)   (-0.103669,-0.538752)
(-0.597382,-0.273305)   (-0.469052,0.202163)   (-0.0115958,0.248459)
(-0.16532,-0.269268)   (-0.710068,-0.259756)   (-0.531826,0.577016)
(0.0516525,0.32187)   (0.0202206,0.0750899)   (-0.392351,-0.279649)
(-0.792725,0.241556)   (0.298028,0.557757)   (-0.0253494,-0.414048)
(-0.310451,0.33237)   (-0.467347,0.18594)   (-0.215681,0.705421)
(0.421411,-0.117124)   (-0.58673,-0.075928)   (0.224719,0.473378)
(0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)
(0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)
(0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)
(0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)

.... which contains a lot of zeroes that are not in matlab's result.

Anyone an idea of what is going on here ?

Thanks in advance,

Fokko Beekhof

0
9/21/2007 3:55:54 PM
comp.dsp 20333 articles. 1 followers. allnor (8509) is leader. Post Follow

1 Replies
550 Views

Similar Articles

[PageSpeed] 1

.... the answer to my own question is that in FFTW's real-to-complex
transforms and vice versa, the number of elements is not equal as in my
code.

And this is written in FFTW's documentation.

Fokko Beekhof

Fokko Beekhof wrote:
> Hello,
> 
> I have something strange...
> 
> There is a matrix of 5x5, padded with zeroes to 9x9:
> Columns 1 through 7
> 
>    -0.1449   -0.0888    0.0095   -0.0816    0.1081         0         0
>     0.0013   -0.1255   -0.0517   -0.0423    0.0090         0         0
>    -0.0156    0.2098    0.2978   -0.1366   -0.1449         0         0
>     0.0103    0.0943    0.0068    0.0311   -0.0550         0         0
>     0.0711    0.0695   -0.0577    0.0572   -0.0314         0         0
>          0         0         0         0         0         0         0
>          0         0         0         0         0         0         0
>          0         0         0         0         0         0         0
>          0         0         0         0         0         0         0
> 
>   Columns 8 through 9
> 
>          0         0
>          0         0
>          0         0
>          0         0
>          0         0
>          0         0
>          0         0
>          0         0
>          0         0
> 
> In matlab, an fft2 yields the following:
>  Columns 1 through 3
> 
>    0.0000             0.2733 - 0.1159i  -0.2439 - 0.4495i
>   -0.4673 - 0.1859i  -0.6651 - 0.2544i  -0.6534 + 0.4118i
>   -0.3924 + 0.2796i  -0.4806 + 0.5024i   0.3644 + 0.6977i
>   -0.1653 + 0.2693i  -0.0195 + 0.3936i   0.5265 - 0.1896i
>    0.1352 + 0.2382i   0.2658 + 0.0587i   0.0051 - 0.4679i
>    0.1352 - 0.2382i  -0.1037 - 0.5388i  -0.5974 - 0.2733i
>   -0.1653 - 0.2693i  -0.7101 - 0.2598i  -0.5318 + 0.5770i
>   -0.3924 - 0.2796i  -0.7927 + 0.2416i   0.2980 + 0.5578i
>   -0.4673 + 0.1859i  -0.2157 + 0.7054i   0.4214 - 0.1171i
> 
>   Columns 4 through 6
> 
>   -0.3748 + 0.1383i  -0.0044 + 0.1137i  -0.0044 - 0.1137i
>   -0.2228 + 0.3993i   0.1978 + 0.4462i   0.2247 - 0.4734i
>    0.3786 - 0.0615i   0.2339 - 0.1726i  -0.3105 - 0.3324i
>   -0.3444 - 0.5698i  -0.2941 + 0.1250i   0.0202 - 0.0751i
>   -0.5753 - 0.0160i  -0.0069 + 0.2812i  -0.0116 - 0.2485i
>   -0.4691 + 0.2022i  -0.0116 + 0.2485i  -0.0069 - 0.2812i
>    0.0517 + 0.3219i   0.0202 + 0.0751i  -0.2941 - 0.1250i
>   -0.0253 - 0.4140i  -0.3105 + 0.3324i   0.2339 + 0.1726i
>   -0.5867 - 0.0759i   0.2247 + 0.4734i   0.1978 - 0.4462i
> 
>   Columns 7 through 9
> 
>   -0.3748 - 0.1383i  -0.2439 + 0.4495i   0.2733 + 0.1159i
>   -0.5867 + 0.0759i   0.4214 + 0.1171i  -0.2157 - 0.7054i
>   -0.0253 + 0.4140i   0.2980 - 0.5578i  -0.7927 - 0.2416i
>    0.0517 - 0.3219i  -0.5318 - 0.5770i  -0.7101 + 0.2598i
>   -0.4691 - 0.2022i  -0.5974 + 0.2733i  -0.1037 + 0.5388i
>   -0.5753 + 0.0160i   0.0051 + 0.4679i   0.2658 - 0.0587i
>   -0.3444 + 0.5698i   0.5265 + 0.1896i  -0.0195 - 0.3936i
>    0.3786 + 0.0615i   0.3644 - 0.6977i  -0.4806 - 0.5024i
>   -0.2228 - 0.3993i  -0.6534 - 0.4118i  -0.6651 + 0.2544i
> 
> Now, I have following program:
> #include <complex>
> #include <iostream>
> #include <fftw3.h>
> #include <algorithm>
> 
> double data [81] = {
> -0.144892,  -0.0888301,  0.00954482,  -0.0816278, 0.108072,
> 0,  0,  0,  0,
> 0.00130495,  -0.125482,  -0.0517049,  -0.0422596,  0.00901076,
> 0,  0,  0,  0,
> -0.0155715,  0.209789,  0.297849,  -0.136606,  -0.144892,
> 0,  0,  0,  0,
> 0.010323,  0.0943392,  0.0067982,  0.0311058,  -0.0550466,
> 0,  0,  0,  0,
> 0.0710997,  0.069528,  -0.0577017,  0.0572293,  -0.0313799,
> 0,  0,  0,  0,
> 0,  0,  0,  0,  0,  0,  0,  0,  0,
> 0,  0,  0,  0,  0,  0,  0,  0,  0,
> 0,  0,  0,  0,  0,  0,  0,  0,  0,
> 0,  0,  0,  0,  0,  0,  0,  0,  0};
> 
> 
> int main()
> {
> 	double in [81];
> 	std::complex<double> out2d [81];
> 
> 	fftw_plan p2d = fftw_plan_dft_r2c_2d(9, 9, in,
> 				(fftw_complex*)out2d,
> 					   FFTW_ESTIMATE);
> 
> 	std::copy(data, data+81, in);
> 
> 	for (int x = 0; x < 9; ++x)
> 	{
> 		for (int y = 0; y < 9; ++y)
> 			std::cout << in[9*x+y] << "   ";
> 		std::cout << std::endl;
> 	}
> 	std::cout << std::endl;
> 
> 	fftw_execute(p2d);
> 	fftw_destroy_plan(p2d);
> 
> 	for (int x = 0; x < 9; ++x)
> 	{
> 		for (int y = 0; y < 9; ++y)
> 			std::cout << out2d[9*x+y] << "   ";
> 		std::cout << std::endl;
> 	}
> 	std::cout << std::endl;
> 
> 	return 0;
> }
> 
> And compute the 2D FFT with it. Then the computed values are:
> (-3.7e-07,0)   (0.273315,-0.115934)   (-0.243932,-0.449487)
> (-0.374841,0.138284)   (-0.00435327,0.113728)   (-0.467347,-0.18594)
> (-0.665096,-0.254414)   (-0.653422,0.411802)   (-0.222791,0.399276)
> (0.197808,0.446171)   (-0.392351,0.279649)   (-0.480622,0.502412)
> (0.364381,0.697738)   (0.37858,-0.0614555)   (0.233949,-0.172564)
> (-0.16532,0.269268)   (-0.0194797,0.393635)   (0.526491,-0.189582)
> (-0.344401,-0.569772)   (-0.29414,0.124964)   (0.135219,0.238206)
> (0.265819,0.0586845)   (0.00508875,-0.46789)   (-0.575287,-0.0159722)
> (-0.00689842,0.281154)   (0.135219,-0.238206)   (-0.103669,-0.538752)
> (-0.597382,-0.273305)   (-0.469052,0.202163)   (-0.0115958,0.248459)
> (-0.16532,-0.269268)   (-0.710068,-0.259756)   (-0.531826,0.577016)
> (0.0516525,0.32187)   (0.0202206,0.0750899)   (-0.392351,-0.279649)
> (-0.792725,0.241556)   (0.298028,0.557757)   (-0.0253494,-0.414048)
> (-0.310451,0.33237)   (-0.467347,0.18594)   (-0.215681,0.705421)
> (0.421411,-0.117124)   (-0.58673,-0.075928)   (0.224719,0.473378)
> (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)
> (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)
> (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)
> (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)   (0,0)
> 
> ... which contains a lot of zeroes that are not in matlab's result.
> 
> Anyone an idea of what is going on here ?
> 
> Thanks in advance,
> 
> Fokko Beekhof
> 
0
fpbeekhof (2)
9/22/2007 3:18:39 PM
Reply:

Similar Artilces:

dock a matlab figure in another matlab figure
I have an easy questions for you expert of matlab. I need to dock a matlab figure in another figure. What is the procedure ??? Thanks for your precious help, Chris Chris wrote: > I need to dock a matlab figure in another figure. Hi, AFAIK, you can't. J�r�me J�r�me wrote: > Chris wrote: > >> I need to dock a matlab figure in another figure. > > Hi, > > AFAIK, you can't. > > J�r�me there's something "similar" since matlab 7 (afaik). however, i don't know how to control this from a program: - open two figures - on each, cli...

how to call matlab file to another matlab file
Hey friends, i am working on simulation of power system using matlab. for that i have written codes for generation side and line side separately. Now i want to use the result of generation file to line file....so how can i use the result of one file to another.... eg i have gen.m file from that i can get hourly gen data....now i want to compare that data to line.....and line modelling is done in separate file line.m so i want to call result of gen.m file to line.m file..... waiting for ur valuable suggestion thanks ...

FFTW in Matlab
Hello, This link is not really related to Matlab. So please bear with me a bit. If I only use a Intel Pentium PC and VC6++ compiler, is it possible to minimize the footprint of FFTW? (because some files are for other CPUs and OS's) BTW, can anyone tell me an exact link(s) to download FFTW on Windows? On the download site, it says VC6++ is buggy, in what sense? Thanks a lot. http://groups-beta.google.com/group/sci.math.num-analysis/browse_frm/thread/f1d3fe1f0d3fb3f1/8dca568de59a65db?q=fftw+spasmous&rnum=1#8dca568de59a65db This is a link for how I compiled fftw version 2 on Windows...

FFTW on DSP
Hello All, I'm planning to use FFTW library on the DSP....has anybody used it with code composer studio to generate the coff file for the DSP ??..please share your experiences Thanks bngguy I woould suggest that you use the manufacturer's optimized FFT vice FFTW. FFTW is designed for general purpose processors. The chip maker will have special code that takes advantage of all the special hardware designed into the DSP chip. FFTs execution speed is a major marketing number so all chip vendors that I am aware put lots of effort into getting the best possible spe...

FFTW and Matlab
Does Matlab use FFTW (http://www.fftw.org/index.html) algorithms? Is source included? Beau, beau@omatrix.com Harmonic Software wrote: > Does Matlab use FFTW (http://www.fftw.org/index.html) algorithms? Is > source included? > > Beau, beau@omatrix.com > > doc fft (section about the algorithm). you can believe me, it pays to first have a look into the docs before going public... michael ...

one complex fft2 vs. two real fft2's with fftw
I have a function performing the fft2/ifft2 of two arrays, e.g. 'a' and 'b' (doubles, strictly real). From an overly simplistic test script (see below), the profiler shows it to be 35% quicker if I use fft2/ifft2(a+i*b) rather than performing the operations on the arrays individually [1024x1024] (discovered on a lark). Does anyone have any experience/insight on this? Is this just because I haven't done any tuning with fftw? Would it be worthwhile building an fftw wisdom base for arrays this small? I'm running 2007a on OS X.4 (Tiger) on a Core 2 Duo MacBook w/ 2GB o...

matlab fft and fftw
Hi. I did a simple test (1d fft) of some data with fftw and matlab. The results seem to differ. I wonder what am I missing? I need to port my codes from matlab to a custom program. Many thanks for any help. fftw: fftw_complex *in, *out; fftw_plan p; int N = 16; in = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N); out = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * N); in[0][0] = -157; in[1][0] = -157; in[2][0] = -163; in[3][0] = -162; in[4][0] = -153; in[5][0] = -147; in[6][0] = -146; in[7][0] = -148; in[8][0] = -152; in[9][0] = -152; in[10][0] = -153; in[11][0] = -154; in[12][0] = -156; in[13][0] = -161; in[14][0] = -160; in[15][0] = -153; for (int i = 0; i < N; i++) in[i][1] = 0; p = fftw_plan_dft_1d(N, in, out, FFTW_FORWARD, FFTW_ESTIMATE); fftw_execute(p); This is what I got: -2475 -40.6284 8.89949 27.4691 3 -5.52795 -10.8995 -5.31273 -7 -5.31273 -10.8995 -5.52795 3 27.4691 8.89949 -40.6284 compare this to the following I got from fft in matlab -2474.00 -39.63 9.90 28.47 4.00 -4.53 -9.90 -4.31 -6.00 -4.31 -9.90 -4.53 4.00 28.47 9.90 -39.63 On May 18, 7:37=A0am, "Marc2050" <maarcc@n_o_s_p_a_m.gmail.com> wrote: > Hi. > > I did a simple test (1d fft) of some data with fftw and matlab. > The results seem to differ. I wonder what am I missing? > I need to port my codes from matlab to a custom program. > Many thanks fo...

another FFTW problem
Hi, I am using FFTW to try another test, f(t)=exp(-x), x>=0, the real par of the Fourier transforms should be 1/(1+x^2). I use xmax=1000, and xmin=0 let N=8192. I found the results seems shifted upper, every output value i larger than the analytical solution. My code is like this: program test implicit none include "fftw3.f" integer N parameter(N=8192) integer pi parameter(pi=3.14159265357) double complex in double complex out double precision f dimension out(N) dimension in(N) dimension f(N) integer i real*8 :: x,y,xmax,xmin,dx integer*8 plan OPEN(UNIT=7,FILE='fftin') OPEN(UNIT=8,FILE='fftout') ! write(*,*) 'Input array:' xmax=1000. xmin=0. dx=(xmax-xmin)/N write(6,* 'XMAX',xmax,'xmin',xmin,'dx',dx,'N',N,'omega',1.0/(2.0*dx)*2*pi do i = 1,N/2+1 x=xmin+dx*(i-1) in(i)=exp(-x)*(-1)**(i+1) if(i.gt.N/2+1) in(i)=0.0 enddo do i=1,N x=xmin+dx*(i-1) write(7,*) i,x,real(in(i)), imag(in(i)) enddo close(7) !call dfftw_plan_r2r_1d (plan, N, in, out, fftw_r2hc, FFTW_ESTIMATE) !call dfftw_plan_dft_r2c_1d(plan,N,in,out,FFTW_ESTIMATE) call dfftw_plan_dft_1d (plan, N, in, out, FFTW_FORWARD, FFTW_ESTIMATE) call dfftw_execute(plan) !write(*,*) 'Output array:' do i = 1,N f(i)=(-N/2+i-1)/(N*dx) write(8,* i,f(i)*2*pi,real(out(i))*dx,imag(out(i))*dx,1./(1.+(f(i)*2.*pi)**2),-f(i)*2.*p...

Another week, another
Mac service pack. 10.5.8 is out. Will Apple ever get their OS fixed? Tommy Troll wrote: > Mac service pack. 10.5.8 is out. Will Apple ever get their OS fixed? Only a stop gap solution once you realize iPhones are priority 1. In article <4A7A3995.5020602@aol.com>, JohnQ <Johnquincygunn@aol.com> wrote: > Tommy Troll wrote: > > Mac service pack. 10.5.8 is out. Will Apple ever get their OS fixed? > > Only a stop gap solution once you realize iPhones are priority 1. Too bad for that theory, given that iPod sales are trending down, iPhone/Touch is trending up, but doesn't match Apple's biggest income source, which is its Mac lineup. Steve Hix wrote: > In article <4A7A3995.5020602@aol.com>, JohnQ <Johnquincygunn@aol.com> > wrote: > > > Tommy Troll wrote: > > > Mac service pack. 10.5.8 is out. Will Apple ever get their OS fixed? > > > > Only a stop gap solution once you realize iPhones are priority 1. > > Too bad for that theory, given that iPod sales are trending down, > iPhone/Touch is trending up, but doesn't match Apple's biggest income > source, which is its Mac lineup. May be true, but more ads and effort is behind the phone. Or had you not noticed that the Mac ads are way down? Posted from my Blackberry On Wed, 5 Aug 2009 18:46:42 -0700, Tommy Troll wrote (in article <73b17480-89db-4f72-b396-ad83d57cba41@z31g2000yqd.googlegroups.com>): > Mac s...

FFTW planner in Matlab R14
Hello! I'm trying to evaluate the speed of fftw in matlab 7 (R14) but I can't get it to use the planner. One of the calls I'm trying to get to work is fftw('planner','exhaustive') It seems that the first call to fft2() takes a lot of time which makes sense but the time of the time (tic,toc) of subsequent calls are exactly the same as with the trivial planner, fftw('planner','estimate'). Has anybody else got this stuff to show any improvement? I have played with the fftw3-codebase directly and the speedup using the exhaustive planner in singl...

Question about DSP in Matlab (beginner)
Hi, I'm starting to learn DSP (Matlab )and I have two questions about it, maybe someone can help me out? I'm trying to measure a frequency from an Audio Device and I'm using FFT to transform it from the time domain to the frequency domain. But I am doing a downsample before the FFT. But you can also do it after the FFT. Do you know what would be the most efficient (before or after)? And why? Another question, I am using zero padding to increase my system resolution (up to 50Hz). My frame length is N=256 and sample frequency fs= 44100 Hz. So 44100/50 = 882, so I need to add 626 zeroes (to 256 frame length) to get 50 Hz resolution, I hope this is correct? I believe this is done for FFT. But is this the same for the DFT? Thank you and regards, --------------------------------------- Posted through http://www.DSPRelated.com >Hi, > >I'm starting to learn DSP (Matlab )and I have two questions about it, >maybe someone can help me out? > >I'm trying to measure a frequency from an Audio Device and I'm using FFT >to transform it from the time domain to the frequency domain. But I am >doing a downsample before the FFT. But you can also do it after the FFT. >Do you know what would be the most efficient (before or after)? And >why? > >Another question, I am using zero padding to increase my system >resolution >(up to 50Hz). My frame length is N%6 and sample frequency fs= 44100 >...

How to link another program in MatLab
Hello, gurus I want to know the matlab command with which I can open and run another program. It is like matlab is a MS-dos command window. Thanks. "Z J" <newzjiang@yahoo.com> wrote in message news:eed8ce6.-1@webx.raydaftYaTP... > Hello, gurus > I want to know the matlab command with which I can open and run > another program. It is like matlab is a MS-dos command window. > Thanks. Read yesterday's thread: "How to run executable files from Matlab," or google CSSM for many more discussions of same. Cheers, Brett ...

How to communicate matlab and another process?
Hi everybody, Here is the situation. I have matlab and a java process that i want to communicate. By the occurrence of an event, this process will send matlab a message containing: - information to be updated in a specific point of a file and; - a command to perform some calculations with the updated data; After this, matlab has to send a message back to the process and inform the result of the calculations that were just done. Can anyone help me with this? Thanks in advance. ...

launching matlab with another application
Hello I just wanted to launch automatically a m-file with another application (on windows). Should I use the Matlab engine with a C program, or is it no simple solution like command line... ? Thanks John Doe John Doe wrote: > Hello > > I just wanted to launch automatically a m-file with another > application (on windows). Should I use the Matlab engine with a C > program, or is it no simple solution like command line... ? > > Thanks > > John Doe run %PathToMatlabExec%\Matlab.exe /r fileToRun.m see also "Adding Startup Options for Windows Platforms" ...

Matlab to simulink to TI DSP
Hi We have developed a Wimax 802.16e model using Matlab floating point implementation. Now we need to move this model to simulink model and use real time workbench to implement it on TI DSP. Is it possible? What's the limitations ? Salam Hossam Alzomor www.i-g.org ...

Close another .exe from Matlab
Hi, How can I make Matlab -- eventually through Java -- close another program (.exe) that was previously open by Matlab with the function open()? Thanks, Max ...

Matlab DSP jobs for graduates
Hi people.First of all I want to thank you all for your contribution to this newsgroup.I found it very useful during my university education and hope to use it post graduation. I have been programming in Matlab for the past 2 years and I am looking for a job that involves Matlab DSP and algorithm development.A search on google doesnt give much results so your help will be appreciated.If you know any agencies that specialise in Matlab jobs in UK then please share with me. Thanks, Cliff Cliff wrote: > Hi people.First of all I want to thank you all for your contribution > to this newsgr...

Matlab Engine on another computer
Is there a way to make a standalone application using the Matlab Engine to work on another computer that doesn't have Matlab ? if yes What is neccessary to make it work ? DLL, anything ? thanks if no well thanks for the information I am running Matlab 2008a On windows Xp sp2. Using Visual Studio 2008, loading matlab engine from a c++ application. In article <707bd891-8a0f-44ae-86a6-6b9148c1f7bd@m3g2000hsc.googlegroups.com>, <badluck066@gmail.com> wrote: >Is there a way to make a standalone application using the Matlab >Engine to work on another comput...

running another .exe in matlab
I want to use in my program the results generated by another program. How can I run in my Matlab program an executable? Thank you. "Alina S" <as_chichi@yahoo.com> wrote in message news:eee5958.-1@webx.raydaftYaTP... > I want to use in my program the results generated by another program. > How can I run in my Matlab program an executable? > Thank you. See HELP SYSTEM, HELP DOS, and/or HELP UNIX. -- Steve Lord slord@mathworks.com "Alina S" <as_chichi@yahoo.com> wrote in message news:eee5958.-1@webx.raydaftYaTP... > I want to use in my program ...

Another MATLAB Builder JA Thread...
Howdy all, I am trying to create a Java project from my MATLAB code using MATLAB Builder JA. I have installed MATLAB Builder JA and added the path (.../toolbox/javabuilder) to MATLAB (version R2009b). Now when I click start in the MATLAB GUI and goto the MATLAB option then over to "MATLAB Builder JA". It shows up so I am assuming it should be working. I also checked my javac -version and java version environment variables by typing each into my command prompt. Honestly I just want to package my code. Does anyone have any ideas to what my problem might be? Thanks, -Je...

From theory to practice
I'm familiar with stationary (FIR/IIR) and adaptive filtering. My matlab skills are OK but I've never done any practical DSP in matlab. There is a book called "Digital Signal Processing using Matlab" by Ingle and Proakis. It starts with very simple things which I find extremely boring so I wonder whether it's the best way to learn how to process some signals. Any useful tutorials or advice would be welcome. On Sat, 2 Jun 2012 08:40:35 +0000 (UTC), "Benjamin S." <niacin89@yahoo.com> wrote: >[...] My matlab >skills are OK but I've never done any practical DSP in matlab. There is a >book called "Digital Signal Processing using Matlab" by Ingle and Proakis. >[...] I >wonder whether it's the best way to learn how to process some signals. "When all you have is a hammer, everything starts to look like a nail." Matlab can be an amazing tool for mathematics. For signal processing it leaves a few things to be desired. (I'll leave it to others to be specific about this.) For LEARNING signal processing, it's like learning to drive in a car with an automatic transmission -- you'll do okay, but you won't understand the fundamental relationships between torque, RPM, gearing, etc. And unless you specifically set out to learn them, you'll be limited to driving cars with automatic transmissions for your whole life. Greg On Sat, 02 Jun 2012 07:35:18 -...

whom to contact to matlab from one system to another
Hello every one, I purchased student version of Matlab when I was full time student. Now I working full time for a company and my thesis is still pending and I need to use matlab again for completion of my pending thesis. Previously it is installed in a older laptop of mine.I am just wondering how to move Matlab from old laptop to new ones. Since I will be using student version for academic purpose i.e for my thesis I am just wondering how to reinstall into new laptop and procedure i.e whether I need to uninstall Matlab from old system etc.Thanks for any help. Q. How do I move Stude...

How to implement MATLAB code on DSP kit
Dear fellows, i have designed a path planning for UAV by using bezier curve on MATLAB R2008a the designing is good but i want to implement it on DSP kit, i have no idea about the DSP kit and its usage. So kindly anyone can help me please or reply me on the address given below. yasir_iqbal688@yahoo.com ...

Complex FFT in DSP vs Matlab
Hi, everyone! I use TMS320c6713 DSP. I compared result of complex fft library in TI DSP with result of complex fft in Matlab. Those waveform in frequency domain are similar, but exactly not matched. It means.. Range of result in DSP library is wider than one in Matlab. Why? Regards. jaeper@gmail.com wrote: > Hi, everyone! > > I use TMS320c6713 DSP. > I compared result of complex fft library in TI DSP with result of > complex fft in Matlab. > Those waveform in frequency domain are similar, but exactly not > matched. > > It means.. > Range of result in DSP...

Web resources about - Another Matlab fft2 != FFTW - comp.dsp

Trump’s Campaign Manager Charged With Battery Today
[guest post by Dana] Corey Lewandowski was charged w ith misdemeanor battery today in the Michelle Fields case. She was the reporter who alleged ...

Ajman Skyscraper Fire Extinguished, But Raises Questions About Infernos In Middle Eastern High-Rise Towers ...
The fire that engulfed a skyscraper in Ajman, a prominent residential city in the United Arab Emirates (UAE), was successfully brought under ...

Spotify raises $1 billion in debt with devilish terms to fight Apple Music
On-demand streaming music is inevitable, so Spotify is taking whatever fuel it can get to win the race against Apple. Whoever can sign up customers ...

California Man Charged With Killing Herbalist, Wife, Child
A California man was charged Tuesday with murder in the slaughter of the family of a Chinese herbalist, including his 5-year-old daughter, over ...

First Georiga, Now Missouri: Religious Liberty Bill Threatens Business In Show-Me State, Say Observers ...
Missouri is poised to pass a so-called “religious liberty bill” that supporters say will protect clergy and others from being forced to condone ...

Mark Zuckerberg goes live on Facebook to talk Oculus, future of virtual reality
Not content to simply announce the long awaited-arrival of the Oculus Rift to consumers, company founder Palmer Luckey and Facebook (the parent ...

Oscar-winning actress Patty Duke dies at 69
Actress and singer Patty Duke, who won an Oscar at age 16 for her portrayal of deaf-blind political activist Helen Keller in "The Miracle Worker," ...

Remains of the Day: Instagram Now Supports 60-Second Videos
You can now post minute-long videos to Instagram. Videos were previously limited to a pithy 15 seconds—longer than a Vine but short enough for ...

Box Office: ‘Batman v Superman’ Racks Up $46 Million Globally on Monday
“Batman v Superman: Dawn of Justice” added $46 million to its global box office haul Monday. That includes a $15 million in domestic receipts ...

Stock Market Closes at Highest Level of 2016 After Interest Rate Announcement
(NEW YORK) — Stocks closed at their highest level of the year as investors welcomed the latest signal from the Federal Reserve that it would ...

Resources last updated: 3/29/2016 11:59:04 PM