Solving DFT of f(n*t) vs t Data Array in C

In summary, the conversation discusses the process of finding the discrete Fourier transform (DFT) of a data array in C, and the difficulties of obtaining the imaginary part when only the magnitude is available. It is suggested to set the imaginary values as zero if the data is all real. The individual also mentions wanting to plot a frequency vs amplitude graph and finding the frequency response of a system for a collage project. Finally, the importance of understanding the DFT process is emphasized.
  • #1
souhal.67
7
0
I have a f(n*t) vs t data areay how to find out its (DFT) Fourier transform in c. I find every time that every program needs its real and imaginarry part. but i have only magnitude. please help me out to find DFT of these data .
 
Physics news on Phys.org
  • #2
If your data is all real then why not put the imaginary values as zero?
 
  • #3
then how i get the value of omega for ploting
 
  • #4
after sampling I have value of t & X(t) like
375.020000 -0.754661
375.030000 -0.755227
375.040000 -0.755841
375.050000 -0.756501
375.060000 -0.757207
375.070000 -0.757960
375.080000 -0.758759
375.090000 -0.759604
375.100000 -0.760494
375.110000 -0.761431
375.120000 -0.762414
375.130000 -0.763442
375.140000 -0.764515
375.150000 -0.765633
375.160000 -0.766797
375.170000 -0.768005
375.180000 -0.769258
I would like to find DFT and I need omega/freq and X(W) value
please help me Thank you
 
  • #5
after sampling I have value of t & X(t) like
375.020000 -0.754661
375.030000 -0.755227
375.040000 -0.755841
375.050000 -0.756501
375.060000 -0.757207
375.070000 -0.757960
375.080000 -0.758759
375.090000 -0.759604
375.100000 -0.760494
375.110000 -0.761431
375.120000 -0.762414
375.130000 -0.763442
375.140000 -0.764515
375.150000 -0.765633
375.160000 -0.766797
375.170000 -0.768005
375.180000 -0.769258
I would like to find DFT and I need omega/freq and X(W) value
please help me Thank you
 
  • #6
How much do you know about discrete Fourier transforms? What are you trying to find out from the data?
 
  • #7
Thank you for reply. I want to find out a frequency Vs Amplitude graph
 
  • #8
I want to find out time vs Amplitude to frequency vs Amplitude of a signal
 
  • #9
And what does DFT do? (I want you to work a bit for this. ;-) )
 
  • #10
I have a collage project and I have a system out put I must make a program to find out system's frequency response of numerically.
 
  • #11
You didn't say what the DFT does. You have asked a question that suggests you have no idea. I could tell you anything and you would believe me. You need to understand about the process.
If you want an answer then put some data in for a familiar waveform for which you know the frequency spectrum. Try some sine waves with different periods.
 

1. What is DFT and how is it used in scientific research?

DFT stands for Discrete Fourier Transform, and it is a mathematical algorithm used to convert a signal from the time domain to the frequency domain. It is commonly used in scientific research to analyze and study the frequency components of a signal, such as a data array collected over time.

2. What is the difference between solving DFT of f(n*t) vs t data array in C and other programming languages?

The process of solving DFT of f(n*t) vs t data array is the same in any programming language, as it involves implementing the mathematical algorithm of DFT. However, the syntax and functions used in C may differ from other programming languages, so the specific code may vary.

3. What are the benefits of using DFT in scientific research?

DFT allows scientists to analyze and study the frequency components of a signal, which can provide valuable insights and information about the underlying patterns and behavior of the signal. It is also a powerful tool for signal processing and filtering, which is useful in a variety of fields such as image and audio processing.

4. How do I know if my data array is suitable for DFT analysis?

In order to use DFT for analysis, the data array must be discrete and evenly spaced in time. This means that the data must be collected at regular intervals with no missing data points. If your data array meets these criteria, it can be suitable for DFT analysis.

5. Are there any limitations or challenges when using DFT for data analysis?

One limitation of DFT is that it assumes the data array is periodic, meaning it repeats itself over a certain time interval. This may not always be the case in real-world data, which can lead to inaccurate results. Additionally, DFT can be computationally intensive and may require large amounts of memory, making it challenging to use for large data sets.

Similar threads

  • Electrical Engineering
Replies
4
Views
709
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Programming and Computer Science
Replies
9
Views
1K
  • Advanced Physics Homework Help
Replies
12
Views
2K
  • General Engineering
Replies
3
Views
999
  • Advanced Physics Homework Help
Replies
7
Views
1K
  • Differential Equations
Replies
3
Views
3K
Replies
2
Views
962
Back
Top