Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

radix 2 disspation in frequency

Asked by ayman osama

ayman osama (view profile)

on 5 Dec 2012
for K=0:7
    for N=0:3
        if mod(K,2)==0
            v(N+1)=(x(N+1)+x(N+5))*exp(-1i*N*K*pi/2);
        elseif  mod(K,2)==1
             v(N+1)=((x(N+1)-x(N+5))*exp(-1i*N*pi/4))*exp(-1i*N*K*pi/2);
       end
      end
  Y(K+1)=sum(v);
  end

i assume that is radix 2 disspation in frequency what's wron in it

2 Comments

Walter Roberson

Walter Roberson (view profile)

on 5 Dec 2012

Are you seeing an error message? If not then what difference do you see between what you are getting and what you expected?

ayman osama

ayman osama (view profile)

on 5 Dec 2012

no i didn'y got an error msg i should have fft of x what i see that the first term in fft is right and other terms are wrong i was using dissipation in frequency teq.

ayman osama

ayman osama (view profile)

Products

No products are associated with this question.

1 Answer

Answer by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 6 Dec 2012
Edited by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 6 Dec 2012
x=rand(1,8);    % Example
xo=x(2:2:end);  % odd part
xe=x(1:2:end);  % even part
for N=0:3
  for k=0:3
     Xo(k+1)=xo(k+1)*exp(-j*2*k*N*pi/4)
     Xe(k+1)=xe(k+1)*exp(-j*2*k*N*pi/4)
  end
  Yo(N+1)=sum(Xo)
  Ye(N+1)=sum(Xe)
  Y(N+1)=Ye(N+1)+exp(-j*2*N*pi/n)*Yo(N+1)
  Y(N+5)=Ye(N+1)-exp(-j*2*N*pi/n)*Yo(N+1)
end

0 Comments

Azzi Abdelmalek

Azzi Abdelmalek (view profile)

Contact us