필터 지우기
필터 지우기

how to plot the magnitude of x(k) in matlab

조회 수: 3 (최근 30일)
Aash
Aash 2017년 10월 24일
댓글: Aash 2017년 10월 24일
x(k)= 4j exp(-6*pi*j*k/N)
where 0 <= k <= N-1 and x(k) be N-point DFT of the length N sequence
  댓글 수: 1
Birdman
Birdman 2017년 10월 24일
The question is not clear. Be more specific.

댓글을 달려면 로그인하십시오.

채택된 답변

Rik
Rik 2017년 10월 24일
You already have a function, you just need to calculate the magnitude, which is just the abs function. The thing is, you can see beforehand that this is a useless exercise, because it will always be 4. The exponent part doesn't influence the magnitude, so k has no influence on the magnitude.
N=20;
x_mag=@(k) abs(4j*exp(-6*pi*1j*k/N));
fplot(x_mag,[0,N-1])
(you can also use linspace and plot)
  댓글 수: 1
Aash
Aash 2017년 10월 24일
thanks very much for your help and explanation.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by