How to write matlab code that result odd component zero?
    9 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
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.
0 comentarios
Respuestas (1)
  Nora Khaled
      
 el 25 de Nov. de 2020
        %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]
Ver también
Categorías
				Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

