LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

result from fft labview don't exactly match result from fft matlab

Hy all,

 

In my Vi i try to convert a matlab script in labview.

 

This script only read complex data from a file and execute a fft from these data to plot them.

 

I do the same thing in labview. But the result atfter the fft are not the same.They are very close from matlab but not equal (around 0.0000000002 of difference between 2 value).

 

I have check tha data before fft and there are the same. But after this little difference appear. Is it normal?

 

thanks

 

 

0 Kudos
Message 1 of 4
(3,201 Views)
Normal?  I'd say you got pretty lucky to get the results to match so closely.  Probably the result of some minor difference in implementation or number representation.  In any real application, that difference is likely the least of your uncertainties.
0 Kudos
Message 2 of 4
(3,180 Views)
To add on to what Darin said, its probably a rounding issue. Think about how small that number is. Computer's, despite being very accurate, are not perfect. I don't know what you need it that accurate for but I'm guessing you can consider that an insignificant digit, so I'd just ignore the difference and call them equal.
0 Kudos
Message 3 of 4
(3,167 Views)

Hy again and thanks for your interest.

 

I have think about rounding issur to but i see that the number of digit of precision for my delta is not always the same. If it was a round issue this number of digit must be the same isn't it?

 

here an example of the result of 

 

 



































































FFT REAL
MATLAB
FFT IMG MATLAB   FFT REAL LABVIEWS FFT IMG LABVIEWS   Delta Delta
0.2439215265466 -20.6244963587988   0.2439215265169 20.6244963588204   -0.0000000000296 0.0000000000216
35.3418323090863 -16.0193204410532   35.3418323090354 16.0193204411354   -0.0000000000509 0.0000000000822
-30.0847372062955 13.4711867775362   -30.0847372060969 -13.4711867779444   0.0000000001986 -0.0000000004082
-28.1038241917289 -16.7751287101563   -28.1038241917184 16.7751287100981   0.0000000000105 -0.0000000000582
-21.9779889253204 4.5986607633003   -21.9779889253204 -4.5986607633003   0.0000000000000 0.0000000000000

 

The problem is : when i compute for the total power of my signal i have a diiference of 0.5dB between matlab and labview due to this fft difference.

 

What can i do?

 

Thanks

0 Kudos
Message 4 of 4
(3,138 Views)