Find a formula for the first harmonic

2 ビュー (過去 30 日間)
Alexander
Alexander 2015 年 12 月 3 日
The procedure. We have a time-series (N last terms) x(1:N). Find Discrete Fourier Transfom h(1:N) = DFT(x). Find the Inverse DFT for the first harmonic (h(2) and h(N)) y(1:N). How to find a formula for the last term y(N)? I use the Symbolic Math TB:
syms N n x(n) k
h_term(n) = x(n) * exp(-2i*pi*(k-1)*(n-1)/N);
h(k) = symsum(h_term,n,1,N);
%h(2)
%h(N)
%y_term(k) = h(k) * exp(2i*pi*(k-1)*(n-1)/N);
yLast = (h(2) * exp(2i*pi*(N-1)/N) + h(N) * exp(2i*pi*(N-1)*(N-1)/N)) / N;
The formula contains i(=sqrt(-1)) but signals x and y are real. I need a simple formula for programming in C++ without complex numbers and expressions. How to find a simple formula with only sin & cos?

回答 (0 件)

カテゴリ

Help Center および File ExchangeDiscrete Fourier and Cosine Transforms についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by