Calculator Input
Example Data Table
This sample 4 × 4 matrix is suitable for a forward transform test.
| Row | C0 | C1 | C2 | C3 |
|---|---|---|---|---|
| R0 | 1 | 2 | 3 | 4 |
| R1 | 5 | 6 | 7 | 8 |
| R2 | 9 | 10 | 11 | 12 |
| R3 | 13 | 14 | 15 | 16 |
Formula Used
Forward transform: X(u,v) = α Σx Σy f(x,y)e-i2π(ux/M + vy/N)
Inverse transform: f(x,y) = β Σu Σv F(u,v)ei2π(ux/M + vy/N)
Magnitude and phase: |X| = √(Re² + Im²), phase = atan2(Im, Re)
Here, M is the row count and N is the column count. The factors α and β depend on the selected normalization.
Centering moves low frequencies to the matrix center for easier spectral inspection. It does not change the actual information content.
How to Use This Calculator
- Enter the matrix size in rows and columns.
- Paste matrix values using spaces or commas between entries.
- Choose forward mode for spectral analysis or inverse mode for reconstruction.
- Select the normalization rule that matches your workflow.
- Enable centering when you want low frequencies shown in the middle.
- Click Compute Transform to view the result above the form.
- Use the export buttons to save the output tables as CSV or PDF.
Frequently Asked Questions
1. What does the forward transform show?
It converts a spatial matrix into frequency components. You can inspect dominant frequencies, phase behavior, DC level, and overall spectral energy from the resulting complex grid.
2. What does inverse mode do?
Inverse mode reconstructs the spatial matrix from frequency-domain coefficients. It is useful for verifying transforms, testing filtered spectra, and checking reconstruction quality.
3. Can I enter complex numbers?
Yes. Use values such as 3+2i, -1.5i, 4, or 7-3i. This is helpful when you already have spectral coefficients or need inverse reconstruction.
4. Why would I center the spectrum?
Centering moves the zero-frequency component to the middle. This often makes patterns easier to read, especially when comparing low and high frequency regions visually.
5. What normalization should I choose?
Use standard for common textbook behavior, unitary when you want symmetric scaling, and scale forward when your workflow expects normalization on the forward step.
6. Why are magnitude and phase both important?
Magnitude measures strength at each frequency. Phase tracks positional relationships. Many reconstruction tasks require both, because removing phase can severely distort spatial structure.
7. Is this suitable for large images?
This implementation is designed for learning, testing, and small matrices. Large grids become computationally heavy because direct two-dimensional summation is slower than FFT methods.
8. What file formats do the exports create?
The calculator exports a CSV file for spreadsheet work and a PDF report for sharing or printing. Both include the current result set and key metrics.