Comments (3)
Zero-padding itself is not considered a part of DFT. In most implementations, the signal is padded separately and then the DFT is called. Implementation here will look something like this:
N = 20; //Such that padding length is less than signal length
double[] paddedSignal = UtilMethods.padSignal(signal, N);
DiscreteFourier df = new DiscreteFourier(paddedSignal);
df.ffit();
from jdsp.
Well, in the MATLAB-implementation of fft, you do have the possibility of the FFT-length, which will either truncate the signal or zero-pad it. Since zero-padding is very often used, maybe it makes sense to implement dft-size inputting, so that users don't have to write the zero-padding code.
from jdsp.
This could lead to a lot of additional complexities in the DiscreteFourier class. One of the prime things that surfaces is the mode of truncation and padding. The existing padding pads on either sides in various modes, however in MATLAB, the padding is only on the end with zeros. Then comes the question of truncation. How will the truncation be implemented; will it be truncating from the middle as in: signal [n/2:-n/2]; or just chop off the end or the start?
I think the present implementation is simple and allows for signal modification as required in an extra line of code mostly. The prime reason to avoid this would be to keep the documentation simple and the APIs easy to use.
from jdsp.
Related Issues (20)
- Plotting output is inconsistent with peak detection indices HOT 12
- Feature request: for Independent Components Analysis (ICA) algorithm for multi-channel signal analysis HOT 2
- "Generate" do not generate correct number of samples
- smooth cause phase shift HOT 6
- Using bandpass and bandstop filters for time series data HOT 2
- Use case question HOT 1
- Citing JDSP in Publications HOT 2
- Feature request: for multiplicative scatter correction HOT 1
- Savitzky Golay Filter Java implementation there is a difference from python HOT 12
- Build error due to org.apache.maven Duplicate HOT 23
- Java 19+ SIMD support ? HOT 1
- Real-Time "Processor" Adapter for Transformation HOT 1
- Power Spectral Density Capability HOT 1
- Input data dimensions and window dimensions don't match HOT 1
- The documentation page is not working HOT 2
- Result of Butterworth Bandpass and Bandstop Inconsistent with Python Scipy Library HOT 2
- Feature request : first order low pass filter HOT 2
- UtilMethods.diff throws java.lang.NegativeArraySizeException: -1 HOT 1
- Welch or Multitaper-like bandpower analysis
- Question regarding Phython Scipy Import Signal.Welch HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jdsp.