Skip to main content
16 events
when toggle format what by license comment
Apr 13, 2017 at 12:47 history edited CommunityBot
replaced http://dsp.stackexchange.com/ with https://dsp.stackexchange.com/
Aug 26, 2013 at 12:15 history tweeted twitter.com/#!/StackSignals/status/371969142045552640
Aug 23, 2013 at 14:41 comment added Kitchi @nispio - That's exactly what I figured as well! That, and an indexing issue. But otherwise the algorithm itself is working fine. Thanks for the help!
Aug 21, 2013 at 17:52 comment added nispio I made a rough translation of your C code to matlab, and I verified that the algorithm is sound. In other words, I am fairly certain that this is a problem with your implementation and not your high-level approach. One of the problems in your C implementation that may be causing you grief is that the function generate2DSin fills the array in a column-wise fashion, and then the subsequent for-loop reads it back out in a row-wise fashion. Since the 2D array is not square, this is a big problem. You might want to check all of your code for consistency in this regard.
Aug 20, 2013 at 4:14 history edited Kitchi CC BY-SA 3.0
deleted 178 characters in body
Aug 19, 2013 at 20:12 answer added hotpaw2 timeline score: 2
Aug 19, 2013 at 20:08 comment added nispio I had to add #pragma GCC diagnostic ignored "-fpermissive" in order to suppress a bunch of errors related to variable typing. Also, the function generate2DSin is missing, and you have a mismatched bracket problem (I think it is missing around line 132). Can you try building your example code in isolation to make sure that it compiles, and then repost?
Aug 19, 2013 at 17:40 comment added Kitchi @TomKealy - Added in code... apologies for the C code being so large, I wanted to post a working example. I've tried to comment it to be clear, but please let me know if I need to provide any more information!
Aug 19, 2013 at 17:39 history edited Kitchi CC BY-SA 3.0
Added source code
Aug 19, 2013 at 17:04 answer added nispio timeline score: 1
Aug 19, 2013 at 16:48 comment added nispio @TomKealy I don't think that low-pass filtering and downsampling will give the desired result in this case. Upsampling and low-pass filtering will also not be helpful because the peaks of the FFT will not move to their correct locations as a result of these operations. I think that Kitchi has the right idea here, there is just something amiss in the implementation, or in the interpretation of the results.
Aug 19, 2013 at 16:42 comment added nispio @Kitchi You are correct in your assumption that increasing the padding will also increase your resolution in the frequency domain. This result is easier to see when you think in terms of the DFT rather than the FFT.
Aug 19, 2013 at 14:12 comment added Tom Kealy If you want to interpolate, you'll need to (low pass) filter and downsample - that may be the cause of your difficulties.
Aug 19, 2013 at 13:50 comment added Kitchi I'll edit in my code shortly! I'm padding for interpolation rather than to get a power of two FFT. I (perhaps naively) assumed that a larger amount of padding will give me better interpolation in the fourier domain.
Aug 19, 2013 at 13:34 comment added Tom Kealy Is it possible for you to show us some of the code (say the equivalent bits of Python and C)? Also, why are you doing so much padding? Usually the padding is from the end of your data to the nearest power of the radix of your FFT (e.g 2).
Aug 19, 2013 at 13:30 history asked Kitchi CC BY-SA 3.0