필터 지우기
필터 지우기

I want to have the Sum of a function

조회 수: 1 (최근 30일)
Deniz Bozdogan
Deniz Bozdogan 2021년 6월 20일
답변: Walter Roberson 2021년 6월 20일
I want to find x(t) and i know a_k. How can i do it, could you please help me?

채택된 답변

Walter Roberson
Walter Roberson 2021년 6월 20일
Arrange the t values as a row vector. You can now calculate exp(2*pi*1j*t/T) and get a row vector. Notice that the exp() part here does not include k. Remember that exp(x*k) = exp(x)^k so you can take the k into account in a later step.
Now create a column vector K=-N:N
Now take the row vector of exp() values and take it .^ K . The result will be a 2d array in which the rows correspond to different k values and the columns correspond to different times.
Now construct a column vector A of a_k values in the exact same order as K, so a_(-N) first and a_(N) last.
Multiply A by the result of the ^ operation. The result will be a 2d array in which the rows correspond to k values and the columns correspond to time.
Now total the 2d array along the rows. The result will be a vector in which the columns correspond to time.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by