How to write matlab code that result odd component zero?

조회 수: 1 (최근 30일)
Dipsikha Roy
Dipsikha Roy 2020년 11월 25일
댓글: Dipsikha Roy 2020년 11월 25일
I was given some random in time domain.now i get fourier transform to convert it in the frquency domain.what matlab code can be written so that when i plot it in the frequency domain I can make odd component zero?My sequence in frequency domain should give only even component.

답변 (1개)

Nora Khaled
Nora Khaled 2020년 11월 25일
%vector of random integers
v1=randi(10,10,1);
%find odd number and replace by zero
v2=v1;
v2(mod(v2,2)~=0)=0;
[v1,v2]
  댓글 수: 1
Dipsikha Roy
Dipsikha Roy 2020년 11월 25일
I have sequence in tym domain so fft must be done to convert the signal in frequency domain.

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by