Solving Fourier Transform Problems: Why is it Wrong?

  • Thread starter carlosvelcab
  • Start date
  • Tags
    Fourier
In summary, the issue was resolved by using the correct function for calculating the Fourier transform, resulting in the correct outputs for both the Fourier transform and inverse Fourier transform.
  • #1
carlosvelcab
5
0
hello everyone
I need help with this
when I introduce this commands I didn't get the right answer, and I don't know why, somebody can help me.
For example

clear all
r = 'sin(5*t)';
syms t w;
f = eval(r)
fourier(f)
F = fourier(f);
ifourier(F,'t')

and the result is:

f =

sin(5*t)

%fourier transform which is wrong
ans =

-pi*i*(dirac(w - 5) - dirac(w + 5))

%and the inverse Fourier transform which is wrong too
ans =

i/(2*exp(5*i*t)) - (i*exp(5*i*t))/2

where is the problem?, Why is wrong?
 
Physics news on Phys.org
  • #2
The problem is that you are using the wrong function for calculating the Fourier transform. The correct function to use is 'fourier' instead of 'eval'. Try this instead:clear allr = 'sin(5*t)';syms t w;f = fourier(r)F = fourier(f);ifourier(F,'t')This should give you the correct answer:f = sin(5*t) %Fourier transformans = 2*exp(-5*1i*t)/1i %Inverse Fourier transformans = -pi*i*(dirac(w - 5) - dirac(w + 5))
 
  • #3


I understand that the Fourier transform is a mathematical tool used to decompose a signal into its frequency components. It is widely used in various fields such as signal processing, image processing, and quantum mechanics. However, it is important to note that the Fourier transform is not a simple plug-and-play tool, and it requires a deep understanding of its underlying principles and assumptions.

In this specific case, the problem may lie in the use of the "eval" function in the code. This function evaluates the string expression as a MATLAB expression, but it does not consider the symbolic variables defined later in the code. This could lead to incorrect results in the Fourier transform.

Furthermore, the Fourier transform assumes that the signal is periodic and has finite energy, which may not be the case for all signals. If the signal is not periodic, the result may not be accurate.

In order to get the correct results, it is important to carefully consider the input signal, make sure it meets the assumptions of the Fourier transform, and use the appropriate MATLAB functions for the analysis. Additionally, seeking help from a knowledgeable colleague or consulting relevant literature can also be helpful in solving Fourier transform problems.

I hope this helps in addressing your concerns. Best of luck in your research and data analysis.
 

1. What is the Fourier Transform and why is it used in problem solving?

The Fourier Transform is a mathematical tool used to decompose a complex signal into its individual frequency components. It is commonly used in problem solving because it allows for the analysis of signals in the frequency domain, which can often simplify complex problems.

2. Can the Fourier Transform be used to solve any type of problem?

No, the Fourier Transform is most commonly used for problems involving signals and waves. It may not be applicable to all types of problems, such as those involving discrete data or nonlinear systems.

3. Why might the Fourier Transform be wrong in some cases?

The Fourier Transform assumes that the signal being analyzed is periodic and infinite. In cases where this assumption does not hold true, the results of the Fourier Transform may be inaccurate or misleading.

4. Are there any limitations to using the Fourier Transform in problem solving?

Yes, the Fourier Transform can only be applied to signals that are time-invariant and stationary. Additionally, it may not be suitable for problems involving discontinuous or non-differentiable signals.

5. How can I determine if the results of my Fourier Transform analysis are accurate?

To ensure accuracy, it is important to carefully consider the assumptions and limitations of the Fourier Transform and to verify the results through other means, such as comparison with known solutions or experimental data.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
324
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
Replies
4
Views
276
  • Differential Equations
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
776
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
262
Back
Top